2,6 → 2,7 |
#include <unistd.h> |
#include <syscall.h> |
#include <ipc/ipc.h> |
#include <udebug.h> |
#include "../tester.h" |
|
const char *syscall_name[] = { |
63,12 → 64,12 |
phoneid = rc; |
|
printf("send IPC_M_DEBUG_BEGIN message\n"); |
rc = ipc_call_sync_0_0(phoneid, IPC_M_DEBUG_BEGIN); |
rc = ipc_call_sync_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_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), |
rc = ipc_call_sync_3_2(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_THREAD_READ, |
(sysarg_t)threadid_buf, TIDBUF_SIZE*sizeof(unsigned), |
&tb_copied, &tb_needed); |
printf("-> %d\n", rc); |
|
79,11 → 80,12 |
printf("\ntotal of %u threads\n", tb_needed/sizeof(unsigned)); |
|
while (1) { |
rc = ipc_call_sync_1_3(phoneid, IPC_M_DEBUG_GO, threadid_buf[0], |
&ev_type, &sc_id, &sc_rc); |
rc = ipc_call_sync_2_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_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); |
rc = ipc_call_sync_4_1(phoneid, IPC_M_DEBUG_ALL, |
UDEBUG_M_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", |
97,8 → 99,9 |
printf("read async call args..\n"); |
printf("dest=%u, ptr=%u, len=%u\n", |
(sysarg_t)ipc_args, sc_args[1], sizeof(ipc_args)); |
rc = ipc_call_sync_3_0(phoneid, IPC_M_DEBUG_MEM_READ, |
(sysarg_t)ipc_args, sc_args[1], sizeof(ipc_args)); |
rc = ipc_call_sync_4_0(phoneid, IPC_M_DEBUG_ALL, |
UDEBUG_M_MEM_READ, (sysarg_t)ipc_args, |
sc_args[1], sizeof(ipc_args)); |
printf("-> %d\n", rc); |
printf("args: (%u, %u, %u, %u, %u, %u)\n", |
ipc_args[0], ipc_args[1], ipc_args[2], |