Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2804 → Rev 2805

/branches/tracing/kernel/generic/src/udebug/udebug.c
58,15 → 58,29
}
}
 
void udebug_syscall_event(void)
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)
{
call_t *call;
 
spinlock_lock(&TASK->lock);
/* being debugged + have go */
if (TASK->being_debugged && !TASK->stop_request) { /* locking! */
klog_printf("udebug_syscall_event");
IPC_SET_RETVAL(TASK->debug_go_call->data, 0);
call = TASK->debug_go_call;
IPC_SET_RETVAL(call->data, 0);
IPC_SET_ARG1(call->data, UDEBUG_EVENT_SYSCALL);
IPC_SET_ARG2(call->data, id);
IPC_SET_ARG3(call->data, rc);
klog_printf("udebug_syscall_event/ipc_answer");
 
THREAD->syscall_args[0] = a1;
THREAD->syscall_args[1] = a2;
THREAD->syscall_args[2] = a3;
THREAD->syscall_args[3] = a4;
THREAD->syscall_args[4] = a5;
THREAD->syscall_args[5] = a6;
 
ipc_answer(&TASK->answerbox, TASK->debug_go_call);
spinlock_unlock(&TASK->lock);
waitq_sleep(&THREAD->go_wq);