//branches/tracing/kernel/generic/src/udebug/udebug_ipc.c |
---|
55,7 → 55,7 |
int rc; |
void *buffer; |
printf("debug_regs_write()\n"); |
LOG("debug_regs_write()\n"); |
uspace_data = (void *)IPC_GET_ARG3(call->data); |
to_copy = sizeof(istate_t); |
63,13 → 63,13 |
rc = copy_from_uspace(buffer, uspace_data, to_copy); |
if (rc != 0) { |
printf("debug_regs_write() - copy failed\n"); |
LOG("debug_regs_write() - copy failed\n"); |
return rc; |
} |
call->buffer = buffer; |
printf(" - done\n"); |
LOG(" - done\n"); |
return 0; |
} |
80,7 → 80,7 |
int rc; |
void *buffer; |
printf("udebug_rp_mem_write()\n"); |
LOG("udebug_rp_mem_write()\n"); |
uspace_data = (void *)IPC_GET_ARG2(call->data); |
to_copy = IPC_GET_ARG4(call->data); |
89,13 → 89,13 |
rc = copy_from_uspace(buffer, uspace_data, to_copy); |
if (rc != 0) { |
printf(" - copy failed\n"); |
LOG(" - copy failed\n"); |
return rc; |
} |
call->buffer = buffer; |
printf(" - done\n"); |
LOG(" - done\n"); |
return 0; |
} |
317,7 → 317,7 |
void *buffer; |
int rc; |
printf("debug_regs_read()\n"); |
LOG("debug_regs_read()\n"); |
t = (thread_t *) IPC_GET_ARG2(call->data); |
buffer = malloc(sizeof(istate_t), 0); |
414,7 → 414,7 |
unsigned size; |
int rc; |
printf("udebug_receive_mem_write()\n"); |
LOG("udebug_receive_mem_write()\n"); |
uspace_dst = IPC_GET_ARG3(call->data); |
size = IPC_GET_ARG4(call->data); |
//branches/tracing/kernel/generic/src/udebug/udebug.c |
---|
232,26 → 232,13 |
/** Upon being scheduled to run, check if the current thread should stop. |
* |
* This function is called from clock(). Preemption is enabled. |
* interrupts are disabled, but since this is called after |
* being scheduled-in, we can enable them, if we're careful enough |
* not to allow arbitrary recursion or deadlock with the thread context. |
* This function is called from clock(). |
*/ |
void udebug_before_thread_runs(void) |
{ |
ipl_t ipl; |
return; |
ipl = interrupts_enable(); |
/* Now we're free to do whatever we need (lock mutexes, sleep, etc.) */ |
/* Check if we're supposed to stop */ |
/* Check if we are supposed to stop. */ |
udebug_stoppable_begin(); |
udebug_stoppable_end(); |
interrupts_restore(ipl); |
} |
/** Syscall event hook. |
441,7 → 428,7 |
return; |
} |
printf("udebug_breakpoint/trap_event\n"); |
LOG("udebug_breakpoint/trap_event\n"); |
call = THREAD->udebug.go_call; |
THREAD->udebug.go_call = NULL; |
457,7 → 444,7 |
THREAD->udebug.go = false; |
THREAD->udebug.cur_event = etype; |
printf("- send answer\n"); |
LOG("- send answer\n"); |
ipc_answer(&TASK->answerbox, call); |
mutex_unlock(&THREAD->udebug.lock); |
//branches/tracing/kernel/generic/src/udebug/udebug_ops.c |
---|
499,7 → 499,7 |
state = t->udebug.uspace_state; |
if (state == NULL) { |
_thread_op_end(t); |
printf("udebug_regs_read() - istate not available\n"); |
LOG("udebug_regs_read() - istate not available\n"); |
return EBUSY; |
} |
516,7 → 516,7 |
int rc; |
istate_t *state; |
printf("udebug_regs_write()\n"); |
LOG("udebug_regs_write()\n"); |
/* Try to change the thread's uspace_state */ |
523,7 → 523,7 |
/* On success, this will lock t->udebug.lock */ |
rc = _thread_op_begin(t, false); |
if (rc != EOK) { |
printf("error locking thread\n"); |
LOG("error locking thread\n"); |
return rc; |
} |
530,7 → 530,7 |
state = t->udebug.uspace_state; |
if (state == NULL) { |
_thread_op_end(t); |
printf("udebug_regs_write() - istate not available\n"); |
LOG("udebug_regs_write() - istate not available\n"); |
return EBUSY; |
} |
581,7 → 581,7 |
{ |
int rc; |
printf("udebug_mem_write()\n"); |
LOG("udebug_mem_write()\n"); |
/* n must be positive */ |
if (n < 1) |
595,7 → 595,7 |
return EBUSY; |
} |
printf("dst=%u, size=%u\n", uspace_addr, n); |
LOG("dst=%u, size=%u\n", uspace_addr, n); |
/* NOTE: this is not strictly from a syscall... but that shouldn't |
* be a problem */ |
604,7 → 604,7 |
rc = as_debug_write(uspace_addr, data, n); |
printf("rc=%d\n", rc); |
LOG("rc=%d\n", rc); |
mutex_unlock(&TASK->udebug.lock); |