Rev 2946 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2946 | Rev 3471 | ||
---|---|---|---|
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 94... | Line 100... | ||
94 | } |
100 | } |
95 | 101 | ||
96 | int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type, |
102 | int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type, |
97 | sysarg_t *val0, sysarg_t *val1) |
103 | sysarg_t *val0, sysarg_t *val1) |
98 | { |
104 | { |
- | 105 | ipcarg_t a_ev_type; |
|
- | 106 | int rc; |
|
- | 107 | ||
99 | return async_req_2_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_GO, |
108 | rc = async_req_2_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_GO, |
100 | tid, (sysarg_t)ev_type, (sysarg_t)val0, (sysarg_t)val1); |
109 | tid, &a_ev_type, val0, val1); |
- | 110 | ||
- | 111 | *ev_type = a_ev_type; |
|
- | 112 | return rc; |
|
101 | } |
113 | } |
102 | 114 | ||
103 | int udebug_stop(int phoneid, thash_t tid) |
115 | int udebug_stop(int phoneid, thash_t tid) |
104 | { |
116 | { |
105 | return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_STOP, |
117 | return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_STOP, |