53,9 → 53,6 |
* is connected. It will lock the task, making sure it exists. |
* |
* Interrupts must be already disabled. |
* |
* (TODO: make sure the udebug-cleanup of the task hasn't |
* started yet) |
*/ |
static task_t *get_lock_callee_task(phone_t *phone) |
{ |
259,6 → 256,7 |
if ((flags & THREAD_FLAG_USPACE) != 0) { |
/* Prevent any further debug activity in thread */ |
t->debug_active = false; |
t->cur_event = 0; /* none */ |
|
/* Still has go? */ |
if (t->debug_stop == false) { |
323,6 → 321,7 |
|
t->debug_go_call = call; |
t->debug_stop = false; |
t->cur_event = 0; /* none */ |
|
/* |
* Neither t's lock nor threads_lock may be held during wakeup |
356,7 → 355,12 |
return rc; |
} |
|
//FIXME: additionally we need to verify that we are inside a syscall |
/* Additionally we need to verify that we are inside a syscall */ |
if (t->cur_event != UDEBUG_EVENT_SYSCALL) { |
_thread_op_end(t); |
interrupts_restore(ipl); |
return EINVAL; |
} |
|
/* Copy to a local buffer before releasing the lock */ |
memcpy(buffer, t->syscall_args, 6 * sizeof(unative_t)); |