Rev 2804 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2801 | svoboda | 1 | /** @addtogroup generic |
2 | * @{ |
||
3 | */ |
||
4 | |||
5 | /** |
||
6 | * @file |
||
7 | * @brief Tdebug. |
||
8 | */ |
||
9 | |||
10 | #include <synch/waitq.h> |
||
11 | #include <console/klog.h> |
||
12 | #include <udebug.h> |
||
13 | #include <arch.h> |
||
14 | |||
15 | void udebug_stopping_point(void) |
||
16 | { |
||
17 | if (TASK->stop_request) { /* locking! */ |
||
18 | klog_printf("udebug_stopping_point"); |
||
19 | IPC_SET_RETVAL(TASK->debug_begin_call->data, 0); |
||
20 | ipc_answer(&TASK->answerbox, TASK->debug_begin_call); |
||
21 | TASK->stop_request = false; |
||
22 | TASK->debug_begin_call = NULL; |
||
23 | waitq_sleep(&THREAD->go_wq); |
||
24 | } |
||
25 | } |
||
26 | |||
27 | void udebug_syscall_event(void) |
||
28 | { |
||
29 | /* being debugged + have go */ |
||
30 | if (TASK->being_debugged && !TASK->stop_request) { /* locking! */ |
||
31 | klog_printf("udebug_syscall_event"); |
||
32 | IPC_SET_RETVAL(TASK->debug_go_call->data, 0); |
||
33 | ipc_answer(&TASK->answerbox, TASK->debug_go_call); |
||
34 | waitq_sleep(&THREAD->go_wq); |
||
35 | } |
||
36 | } |
||
37 | |||
38 | /** @} |
||
39 | */ |