Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3423 → Rev 3424

/branches/tracing/kernel/generic/src/udebug/udebug.c
48,7 → 48,7
*/
#include <synch/waitq.h>
#include <console/klog.h>
#include <print.h>
#include <udebug/udebug.h>
#include <errno.h>
#include <arch.h>
288,7 → 288,7
return;
}
 
//klog_printf("udebug_syscall_event");
//printf("udebug_syscall_event\n");
call = THREAD->udebug.go_call;
THREAD->udebug.go_call = NULL;
 
296,7 → 296,7
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");
//printf("udebug_syscall_event/ipc_answer\n");
 
THREAD->udebug.syscall_args[0] = a1;
THREAD->udebug.syscall_args[1] = a2;
332,12 → 332,12
mutex_lock(&TASK->udebug.lock);
mutex_lock(&THREAD->udebug.lock);
 
klog_printf("udebug_thread_b_event");
klog_printf("- check state");
printf("udebug_thread_b_event\n");
printf("- check state\n");
 
/* Must only generate events when in debugging session */
if (THREAD->udebug.debug_active != true) {
klog_printf("- debug_active: %s, udebug.stop: %s",
printf("- debug_active: %s, udebug.stop: %s\n",
THREAD->udebug.debug_active ? "yes(+)" : "no(-)",
THREAD->udebug.stop ? "yes(-)" : "no(+)");
mutex_unlock(&THREAD->udebug.lock);
345,7 → 345,7
return;
}
 
klog_printf("- trigger event");
printf("- trigger event\n");
 
call = THREAD->udebug.go_call;
THREAD->udebug.go_call = NULL;
366,7 → 366,7
mutex_unlock(&THREAD->udebug.lock);
mutex_unlock(&TASK->udebug.lock);
 
klog_printf("- sleep");
printf("- sleep\n");
udebug_wait_for_go(&THREAD->udebug.go_wq);
 
udebug_int_unlock();
381,12 → 381,12
mutex_lock(&TASK->udebug.lock);
mutex_lock(&THREAD->udebug.lock);
 
klog_printf("udebug_thread_e_event");
klog_printf("- check state");
printf("udebug_thread_e_event\n");
printf("- check state\n");
 
/* Must only generate events when in debugging session */
if (THREAD->udebug.debug_active != true) {
klog_printf("- debug_active: %s, udebug.stop: %s",
printf("- debug_active: %s, udebug.stop: %s\n",
THREAD->udebug.debug_active ? "yes(+)" : "no(-)",
THREAD->udebug.stop ? "yes(-)" : "no(+)");
mutex_unlock(&THREAD->udebug.lock);
394,7 → 394,7
return;
}
 
klog_printf("- trigger event");
printf("- trigger event\n");
 
call = THREAD->udebug.go_call;
THREAD->udebug.go_call = NULL;
441,7 → 441,7
return;
}
 
klog_printf("udebug_breakpoint/trap_event");
printf("udebug_breakpoint/trap_event\n");
call = THREAD->udebug.go_call;
THREAD->udebug.go_call = NULL;
 
457,7 → 457,7
THREAD->udebug.stop = true;
THREAD->udebug.cur_event = etype;
 
klog_printf("- send answer");
printf("- send answer\n");
ipc_answer(&TASK->answerbox, call);
 
mutex_unlock(&THREAD->udebug.lock);
491,14 → 491,14
int flags;
ipl_t ipl;
 
klog_printf("udebug_task_cleanup()");
klog_printf("task %llu", ta->taskid);
printf("udebug_task_cleanup()\n");
printf("task %llu\n", ta->taskid);
 
udebug_int_lock();
 
if (ta->udebug.dt_state != UDEBUG_TS_BEGINNING &&
ta->udebug.dt_state != UDEBUG_TS_ACTIVE) {
klog_printf("udebug_task_cleanup(): task not being debugged");
printf("udebug_task_cleanup(): task not being debugged\n");
return EINVAL;
}
 
531,7 → 531,7
t->udebug.stop = true;
 
/* Answer GO call */
klog_printf("answer GO call with EVENT_FINISHED");
printf("answer GO call with EVENT_FINISHED\n");
IPC_SET_RETVAL(t->udebug.go_call->data, 0);
IPC_SET_ARG1(t->udebug.go_call->data, UDEBUG_EVENT_FINISHED);