168,11 → 168,15 |
} |
|
void udebug_syscall_event(unative_t a1, unative_t a2, unative_t a3, |
unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc) |
unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc, |
bool end_variant) |
{ |
call_t *call; |
ipl_t ipl; |
udebug_event_t etype; |
|
etype = end_variant ? UDEBUG_EVENT_SYSCALL_E : UDEBUG_EVENT_SYSCALL_B; |
|
ipl = interrupts_disable(); |
spinlock_lock(&THREAD->debug_lock); |
|
179,7 → 183,7 |
/* Must only generate events when in debugging session and have go */ |
if (THREAD->debug_active != true || |
THREAD->debug_stop == true || |
(TASK->debug_evmask & UDEBUG_EM_SYSCALL) == 0) { |
(TASK->debug_evmask & UDEBUG_EVMASK(etype)) == 0) { |
spinlock_unlock(&THREAD->debug_lock); |
interrupts_restore(ipl); |
return; |
188,7 → 192,7 |
klog_printf("udebug_syscall_event"); |
call = THREAD->debug_go_call; |
IPC_SET_RETVAL(call->data, 0); |
IPC_SET_ARG1(call->data, UDEBUG_EVENT_SYSCALL); |
IPC_SET_ARG1(call->data, etype); |
IPC_SET_ARG2(call->data, id); |
IPC_SET_ARG3(call->data, rc); |
klog_printf("udebug_syscall_event/ipc_answer"); |
207,7 → 211,7 |
*/ |
THREAD->debug_stop = true; |
|
THREAD->cur_event = UDEBUG_EVENT_SYSCALL; |
THREAD->cur_event = etype; |
spinlock_unlock(&THREAD->debug_lock); |
|
spinlock_lock(&TASK->lock); |