0,0 → 1,54 |
/** @addtogroup sctrace |
* @{ |
*/ |
/** @file |
*/ |
|
#include <stdio.h> |
#include <syscall.h> |
#include <ipc/ipc.h> |
#include <async.h> |
#include <udebug.h> |
|
#include "debug_api.h" |
|
int debug_begin(unsigned phoneid) |
{ |
return async_req_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_BEGIN); |
} |
|
int debug_end(unsigned phoneid) |
{ |
return async_req_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_END); |
} |
|
int debug_thread_read(unsigned phoneid, void *buffer, unsigned n, |
unsigned *copied, unsigned *needed) |
{ |
printf("send IPC_M_DEBUG_THREAD_READ message\n"); |
return async_req_3_2(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_THREAD_READ, |
(sysarg_t)buffer, n, copied, needed); |
} |
|
int debug_mem_read(unsigned phoneid, void *buffer, unsigned addr, unsigned n) |
{ |
return async_req_4_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_MEM_READ, |
(sysarg_t)buffer, addr, n); |
} |
|
int debug_args_read(unsigned phoneid, unsigned tid, unsigned *buffer) |
{ |
return async_req_3_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_ARGS_READ, |
tid, (sysarg_t)buffer); |
} |
|
int debug_go(unsigned phoneid, unsigned tid, unsigned *ev_type, |
unsigned *sc_id, unsigned *sc_rc) |
{ |
/* Run thread until a syscall is executed */ |
return async_req_2_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_GO, |
tid, (sysarg_t)ev_type, (sysarg_t)sc_id, (sysarg_t)sc_rc); |
} |
|
/** @} |
*/ |