Rev 2903 | Rev 2913 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2903 | Rev 2908 | ||
---|---|---|---|
Line 301... | Line 301... | ||
301 | 301 | ||
302 | call = THREAD->debug_go_call; |
302 | call = THREAD->debug_go_call; |
303 | IPC_SET_RETVAL(call->data, 0); |
303 | IPC_SET_RETVAL(call->data, 0); |
304 | IPC_SET_ARG1(call->data, UDEBUG_EVENT_THREAD_E); |
304 | IPC_SET_ARG1(call->data, UDEBUG_EVENT_THREAD_E); |
305 | 305 | ||
306 | /* |
- | |
307 | * Make sure debug_stop is true when going to sleep |
- | |
308 | * in case we get woken up by DEBUG_END. (At which |
- | |
309 | * point it must be back to the initial true value). |
306 | /* Prevent any further debug activity in thread */ |
310 | */ |
- | |
311 | THREAD->debug_stop = true; |
307 | THREAD->debug_active = false; |
312 | - | ||
313 | THREAD->cur_event = UDEBUG_EVENT_THREAD_E; |
308 | THREAD->cur_event = 0; /* none */ |
- | 309 | THREAD->debug_stop = true; /* set to initial value */ |
|
314 | spinlock_unlock(&THREAD->debug_lock); |
310 | spinlock_unlock(&THREAD->debug_lock); |
315 | 311 | ||
316 | spinlock_lock(&TASK->lock); |
312 | spinlock_lock(&TASK->lock); |
317 | ipc_answer(&TASK->answerbox, THREAD->debug_go_call); |
313 | ipc_answer(&TASK->answerbox, THREAD->debug_go_call); |
318 | spinlock_unlock(&TASK->lock); |
314 | spinlock_unlock(&TASK->lock); |
319 | 315 | ||
320 | interrupts_restore(ipl); |
316 | interrupts_restore(ipl); |
321 | klog_printf("- sleep"); |
- | |
322 | 317 | ||
323 | waitq_sleep(&THREAD->go_wq); |
318 | /* This event does not sleep - debugging has finished in this thread */ |
324 | } |
319 | } |
325 | 320 | ||
326 | 321 | ||
327 | /** |
322 | /** |
328 | * Terminate task debugging session. |
323 | * Terminate task debugging session. |