Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2900 → Rev 2901

/branches/tracing/kernel/generic/src/syscall/syscall.c
99,8 → 99,10
unative_t rc;
istate_t fake_state;
 
if (id < SYSCALL_END) {
THREAD->uspace_state = &fake_state;
THREAD->uspace_state = &fake_state;
udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
 
if (id < SYSCALL_END) {
udebug_stoppable_begin();
rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
} else {
113,7 → 115,7
if (THREAD->interrupted)
thread_exit();
 
udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc);
udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
udebug_stoppable_end();
THREAD->uspace_state = NULL;
/branches/tracing/kernel/generic/src/udebug/udebug.c
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);
/branches/tracing/kernel/generic/src/udebug/udebug_ops.c
397,7 → 397,8
}
 
/* Additionally we need to verify that we are inside a syscall */
if (t->cur_event != UDEBUG_EVENT_SYSCALL) {
if (t->cur_event != UDEBUG_EVENT_SYSCALL_B &&
t->cur_event != UDEBUG_EVENT_SYSCALL_E) {
_thread_op_end(t);
interrupts_restore(ipl);