Changes in uspace/lib/c/generic/udebug.c [79ae36dd:64d2b10] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/udebug.c
r79ae36dd r64d2b10 35 35 #include <udebug.h> 36 36 #include <sys/types.h> 37 #include <kernel/ipc/ipc_methods.h>38 37 #include <async.h> 39 38 40 int udebug_begin( async_sess_t *sess)39 int udebug_begin(int phoneid) 41 40 { 42 async_exch_t *exch = async_exchange_begin(sess); 43 return async_req_1_0(exch, IPC_M_DEBUG, UDEBUG_M_BEGIN); 41 return async_req_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_BEGIN); 44 42 } 45 43 46 int udebug_end( async_sess_t *sess)44 int udebug_end(int phoneid) 47 45 { 48 async_exch_t *exch = async_exchange_begin(sess); 49 return async_req_1_0(exch, IPC_M_DEBUG, UDEBUG_M_END); 46 return async_req_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_END); 50 47 } 51 48 52 int udebug_set_evmask( async_sess_t *sess, udebug_evmask_t mask)49 int udebug_set_evmask(int phoneid, udebug_evmask_t mask) 53 50 { 54 async_exch_t *exch = async_exchange_begin(sess);55 return async_req_2_0(exch, IPC_M_DEBUG, UDEBUG_M_SET_EVMASK,mask);51 return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_SET_EVMASK, 52 mask); 56 53 } 57 54 58 int udebug_thread_read( async_sess_t *sess, void *buffer, size_t n,59 55 int udebug_thread_read(int phoneid, void *buffer, size_t n, 56 size_t *copied, size_t *needed) 60 57 { 61 58 sysarg_t a_copied, a_needed; 62 63 async_exch_t *exch = async_exchange_begin(sess); 64 int rc = async_req_3_3(exch, IPC_M_DEBUG, UDEBUG_M_THREAD_READ,65 (sysarg_t)buffer, n, NULL, &a_copied, &a_needed);66 67 *copied = (size_t) 68 *needed = (size_t) 69 59 int rc; 60 61 rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_THREAD_READ, 62 (sysarg_t)buffer, n, NULL, &a_copied, &a_needed); 63 64 *copied = (size_t)a_copied; 65 *needed = (size_t)a_needed; 66 70 67 return rc; 71 68 } 72 69 73 int udebug_name_read( async_sess_t *sess, void *buffer, size_t n,74 70 int udebug_name_read(int phoneid, void *buffer, size_t n, 71 size_t *copied, size_t *needed) 75 72 { 76 73 sysarg_t a_copied, a_needed; 77 78 async_exch_t *exch = async_exchange_begin(sess); 79 int rc = async_req_3_3(exch, IPC_M_DEBUG, UDEBUG_M_NAME_READ,80 (sysarg_t)buffer, n, NULL, &a_copied, &a_needed);81 82 *copied = (size_t) 83 *needed = (size_t) 84 74 int rc; 75 76 rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_NAME_READ, 77 (sysarg_t)buffer, n, NULL, &a_copied, &a_needed); 78 79 *copied = (size_t)a_copied; 80 *needed = (size_t)a_needed; 81 85 82 return rc; 86 83 } 87 84 88 int udebug_areas_read( async_sess_t *sess, void *buffer, size_t n,89 85 int udebug_areas_read(int phoneid, void *buffer, size_t n, 86 size_t *copied, size_t *needed) 90 87 { 91 88 sysarg_t a_copied, a_needed; 92 93 async_exch_t *exch = async_exchange_begin(sess); 94 int rc = async_req_3_3(exch, IPC_M_DEBUG, UDEBUG_M_AREAS_READ,95 (sysarg_t)buffer, n, NULL, &a_copied, &a_needed);96 97 *copied = (size_t) 98 *needed = (size_t) 99 89 int rc; 90 91 rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_AREAS_READ, 92 (sysarg_t)buffer, n, NULL, &a_copied, &a_needed); 93 94 *copied = (size_t)a_copied; 95 *needed = (size_t)a_needed; 96 100 97 return rc; 101 98 } 102 99 103 int udebug_mem_read( async_sess_t *sess, void *buffer, uintptr_t addr, size_t n)100 int udebug_mem_read(int phoneid, void *buffer, uintptr_t addr, size_t n) 104 101 { 105 async_exch_t *exch = async_exchange_begin(sess); 106 return async_req_4_0(exch, IPC_M_DEBUG, UDEBUG_M_MEM_READ, 107 (sysarg_t) buffer, addr, n); 102 return async_req_4_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_MEM_READ, 103 (sysarg_t)buffer, addr, n); 108 104 } 109 105 110 int udebug_args_read( async_sess_t *sess, thash_t tid, sysarg_t *buffer)106 int udebug_args_read(int phoneid, thash_t tid, sysarg_t *buffer) 111 107 { 112 async_exch_t *exch = async_exchange_begin(sess); 113 return async_req_3_0(exch, IPC_M_DEBUG, UDEBUG_M_ARGS_READ, 114 tid, (sysarg_t) buffer); 108 return async_req_3_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_ARGS_READ, 109 tid, (sysarg_t)buffer); 115 110 } 116 111 117 int udebug_regs_read( async_sess_t *sess, thash_t tid, void *buffer)112 int udebug_regs_read(int phoneid, thash_t tid, void *buffer) 118 113 { 119 async_exch_t *exch = async_exchange_begin(sess); 120 return async_req_3_0(exch, IPC_M_DEBUG, UDEBUG_M_REGS_READ, 121 tid, (sysarg_t) buffer); 114 return async_req_3_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_REGS_READ, 115 tid, (sysarg_t)buffer); 122 116 } 123 117 124 int udebug_go( async_sess_t *sess, thash_t tid, udebug_event_t *ev_type,118 int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type, 125 119 sysarg_t *val0, sysarg_t *val1) 126 120 { 127 121 sysarg_t a_ev_type; 128 129 async_exch_t *exch = async_exchange_begin(sess); 130 int rc = async_req_2_3(exch, IPC_M_DEBUG, UDEBUG_M_GO,122 int rc; 123 124 rc = async_req_2_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_GO, 131 125 tid, &a_ev_type, val0, val1); 132 126 133 127 *ev_type = a_ev_type; 134 128 return rc; 135 129 } 136 130 137 int udebug_stop( async_sess_t *sess, thash_t tid)131 int udebug_stop(int phoneid, thash_t tid) 138 132 { 139 async_exch_t *exch = async_exchange_begin(sess);140 return async_req_2_0(exch, IPC_M_DEBUG, UDEBUG_M_STOP,tid);133 return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_STOP, 134 tid); 141 135 } 142 136
Note:
See TracChangeset
for help on using the changeset viewer.