Rev 3448 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3448 | Rev 3474 | ||
---|---|---|---|
Line 55... | Line 55... | ||
55 | } |
55 | } |
56 | 56 | ||
57 | int udebug_thread_read(int phoneid, void *buffer, size_t n, |
57 | int udebug_thread_read(int phoneid, void *buffer, size_t n, |
58 | size_t *copied, size_t *needed) |
58 | size_t *copied, size_t *needed) |
59 | { |
59 | { |
60 | unsigned dest_addr; |
60 | ipcarg_t a_copied, a_needed; |
- | 61 | int rc; |
|
61 | 62 | ||
62 | return async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_THREAD_READ, |
63 | rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_THREAD_READ, |
63 | (sysarg_t)buffer, n, &dest_addr, copied, needed); |
64 | (sysarg_t)buffer, n, NULL, &a_copied, &a_needed); |
- | 65 | ||
- | 66 | *copied = (size_t)a_copied; |
|
- | 67 | *needed = (size_t)a_needed; |
|
- | 68 | ||
- | 69 | return rc; |
|
64 | } |
70 | } |
65 | 71 | ||
66 | int udebug_mem_read(int phoneid, void *buffer, uintptr_t addr, size_t n) |
72 | int udebug_mem_read(int phoneid, void *buffer, uintptr_t addr, size_t n) |
67 | { |
73 | { |
68 | return async_req_4_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_MEM_READ, |
74 | return async_req_4_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_MEM_READ, |
Line 76... | Line 82... | ||
76 | } |
82 | } |
77 | 83 | ||
78 | int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type, |
84 | int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type, |
79 | sysarg_t *val0, sysarg_t *val1) |
85 | sysarg_t *val0, sysarg_t *val1) |
80 | { |
86 | { |
- | 87 | ipcarg_t a_ev_type; |
|
- | 88 | int rc; |
|
- | 89 | ||
81 | return async_req_2_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_GO, |
90 | rc = async_req_2_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_GO, |
82 | tid, (sysarg_t)ev_type, (sysarg_t)val0, (sysarg_t)val1); |
91 | tid, &a_ev_type, val0, val1); |
- | 92 | ||
- | 93 | *ev_type = a_ev_type; |
|
- | 94 | return rc; |
|
83 | } |
95 | } |
84 | 96 | ||
85 | int udebug_stop(int phoneid, thash_t tid) |
97 | int udebug_stop(int phoneid, thash_t tid) |
86 | { |
98 | { |
87 | return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_STOP, |
99 | return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_STOP, |