67,7 → 67,6 |
int app_phone; |
volatile bool abort_debug; |
|
thash_t thash; |
volatile int paused; |
|
breakpoint_t brk_list[MAX_BRKPTS]; |
142,9 → 141,12 |
|
static void thread_stop(void) |
{ |
cons_printf("[t] stopped\n"); |
fcv_wait(&go_cv); |
cons_printf("[t] go\n"); |
dthread_t *dt; |
|
dt = dthread_get(); |
cons_printf("[thread %d] stopped\n", dt->id); |
dthread_stop_me(); |
cons_printf("[thread %d] go\n", dt->id); |
} |
|
/* |
222,13 → 224,7 |
switch (ev_type) { |
case UDEBUG_EVENT_STOP: |
cons_printf("stop event\n"); |
cons_printf("waiting for resume\n"); |
while (paused) { |
usleep(1000000); |
fibril_yield(); |
cons_printf("."); |
} |
cons_printf("resumed\n"); |
thread_stop(); |
break; |
case UDEBUG_EVENT_THREAD_B: |
event_thread_b(val0); |
270,7 → 266,7 |
cons_printf("thread %u debugging finished\n", dt->id); |
break; |
} |
if (rc >= 0) debug_event(thash, ev_type, val0); |
if (rc >= 0) debug_event(dt->hash, ev_type, val0); |
} |
|
cons_printf("debug_loop(%d) exiting\n", dt->id); |
287,6 → 283,8 |
if (fid == 0) { |
cons_printf("Warning: Failed creating fibril\n"); |
} |
dt->fid = fid; |
|
fibril_add_ready(fid); |
} |
|