37,6 → 37,8 |
"sys_ipc_connect_task" |
}; |
|
#define TIDBUF_SIZE 64 |
|
char * test_debug1(bool quiet) |
{ |
int taskid; |
48,6 → 50,8 |
unsigned ev_type; |
unsigned sc_id; |
int sc_rc; |
unsigned threadid_buf[TIDBUF_SIZE]; |
int tb_copied, tb_needed; |
|
printf("running debug1 test\n"); |
taskid = 12; |
60,12 → 64,26 |
rc = ipc_call_sync_0_0(phoneid, IPC_M_DEBUG_BEGIN); |
printf("-> %d\n", rc); |
|
printf("send IPC_M_DEBUG_THREAD_READ message\n"); |
rc = ipc_call_sync_2_2(phoneid, IPC_M_DEBUG_THREAD_READ, |
&threadid_buf, TIDBUF_SIZE*sizeof(unsigned), |
&tb_copied, &tb_needed); |
printf("-> %d\n", rc); |
|
printf("thread IDs:"); |
for (i=0; i<tb_copied / sizeof(unsigned); i++) { |
printf("%u", threadid_buf[i]); |
} |
printf("\ntotal of %u threads\n", tb_needed/sizeof(unsigned)); |
|
while (1) { |
rc = ipc_call_sync_0_3(phoneid, IPC_M_DEBUG_GO, &ev_type, |
&sc_id, &sc_rc); |
rc = ipc_call_sync_3_1(phoneid, IPC_M_DEBUG_ARGS_READ, NULL, |
sc_args, 6 * sizeof(unsigned), &copied); |
rc = ipc_call_sync_1_3(phoneid, IPC_M_DEBUG_GO, threadid_buf[0], |
&ev_type, &sc_id, &sc_rc); |
if (rc >= 0) { |
rc = ipc_call_sync_3_1(phoneid, IPC_M_DEBUG_ARGS_READ, |
threadid_buf[0], sc_args, 6 * sizeof(unsigned), &copied); |
} |
if (rc >= 0) { |
printf("%s[%d](%u, %u, %u, %u, %u, %u) -> %d\n", |
syscall_name[sc_id], sc_id, |
sc_args[0], sc_args[1], sc_args[2], |