Rev 2947 | Rev 3008 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2947 | Rev 3005 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | #include <string.h> |
44 | #include <string.h> |
45 | 45 | ||
46 | #include "cmd.h" |
46 | #include "cmd.h" |
47 | #include "cons.h" |
47 | #include "cons.h" |
48 | #include "dthread.h" |
48 | #include "dthread.h" |
- | 49 | #include "breakpoint.h" |
|
49 | #include "include/arch.h" |
50 | #include "include/arch.h" |
50 | #include "fib_synch.h" |
51 | #include "fib_synch.h" |
51 | #include "main.h" |
52 | #include "main.h" |
52 | 53 | ||
53 | void thread_debug_start(unsigned thread_hash); |
54 | void thread_debug_start(unsigned thread_hash); |
Line 65... | Line 66... | ||
65 | int app_phone; |
66 | int app_phone; |
66 | volatile bool abort_debug; |
67 | volatile bool abort_debug; |
67 | 68 | ||
68 | volatile int paused; |
69 | volatile int paused; |
69 | 70 | ||
70 | breakpoint_t brk_list[MAX_BRKPTS]; |
- | |
71 | int lifted_brkpt; |
- | |
72 | - | ||
73 | fcv_t go_cv; |
71 | fcv_t go_cv; |
74 | 72 | ||
75 | static void command_split(char *cmd_str) |
73 | static void command_split(char *cmd_str) |
76 | { |
74 | { |
77 | char *p = cmd_str; |
75 | char *p = cmd_str; |
Line 154... | Line 152... | ||
154 | } |
152 | } |
155 | 153 | ||
156 | /* |
154 | /* |
157 | * Called by a fibril (from arch code) when a breakpoint is hit. |
155 | * Called by a fibril (from arch code) when a breakpoint is hit. |
158 | */ |
156 | */ |
159 | void breakpoint_hit(void) |
157 | void breakpoint_hit(breakpoint_t *b) |
160 | { |
158 | { |
- | 159 | dthread_t *dt; |
|
- | 160 | ||
- | 161 | dt = dthread_get(); |
|
161 | cons_printf("breakpoint hit\n"); |
162 | cons_printf("Thread %d hit breakpoint %d at 0x%lx\n", |
- | 163 | dt->id, b->id, b->addr); |
|
162 | thread_stop(); |
164 | thread_stop(); |
163 | } |
165 | } |
164 | 166 | ||
165 | /* |
167 | /* |
166 | * Called by a fibril (from arch code) when a single instruction |
168 | * Called by a fibril (from arch code) when a single instruction |
Line 385... | Line 387... | ||
385 | { |
387 | { |
386 | next_thread_id = 1; |
388 | next_thread_id = 1; |
387 | paused = 0; |
389 | paused = 0; |
388 | 390 | ||
389 | list_initialize(&dthreads); |
391 | list_initialize(&dthreads); |
- | 392 | breakpoint_init(); |
|
390 | cwt = NULL; |
393 | cwt = NULL; |
391 | 394 | ||
392 | fcv_init(&go_cv); |
395 | fcv_init(&go_cv); |
393 | } |
396 | } |
394 | 397 |