diff options
author | Malfurious <m@lfurio.us> | 2023-10-07 02:02:44 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-04-24 13:31:08 -0400 |
commit | 3a8bf604bf4d086bdc4fee70a82371a338835222 (patch) | |
tree | e6658479925d4583ae0b88c7bef0fb8c4c8df240 | |
parent | 66db439988aa07828593aac109f5690bb48f2dc9 (diff) | |
download | misplays-3a8bf604bf4d086bdc4fee70a82371a338835222.tar.gz misplays-3a8bf604bf4d086bdc4fee70a82371a338835222.zip |
Fix bug with cleaning temporary breakpoints
dont remove them before initial use
Signed-off-by: Malfurious <m@lfurio.us>
-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); + } } } } |