diff options
-rw-r--r-- | debugger.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -87,15 +87,16 @@ static void uninstall_breakpoints(struct thread *th) { if (b->installed) { ptrace(PTRACE_POKETEXT, th->id, b->address, b->text); b->installed = 0; - } - if (b->enabled < 0) { - struct thread *t; - if (b->tid == 0 || - ((t = thread_by_id(th->proc, b->tid)) && !t->shouldcont)) { - struct breakpoint *del = b; - b = b->next; - list_remove(del); - free(del); + + if (b->enabled < 0) { + struct thread *t; + if (b->tid == 0 || + ((t = thread_by_id(th->proc, b->tid)) && !t->doing)) { + struct breakpoint *del = b; + b = b->next; + list_remove(del); + free(del); + } } } } |