summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-10-07 03:32:24 -0400
committerMalfurious <m@lfurio.us>2024-04-24 13:31:08 -0400
commite68b37e4f8af8051ab3ac55b49a742a46b98081b (patch)
tree41f9a8108423da849dc89eba4bc50f8da7fd9aa6
parent0991376bb2c94dc1e2dc85015de6b7e3767247b5 (diff)
downloadmisplays-e68b37e4f8af8051ab3ac55b49a742a46b98081b.tar.gz
misplays-e68b37e4f8af8051ab3ac55b49a742a46b98081b.zip
Enable user creation of thread-specific breakpoints
Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r--misplays.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/misplays.c b/misplays.c
index 6391d98..cda2abb 100644
--- a/misplays.c
+++ b/misplays.c
@@ -303,16 +303,21 @@ int main(int argc, char **argv) {
char *t = cmd;
int en = 1;
+ pid_t tid = 0;
if (t[0] == '!') {
en = -1;
t++;
} else if (t[0] == '#') {
en = 0;
t++;
+ } else if (t[0] == '@') {
+ tid = th->id;
+ t++;
}
unsigned long address = strtoul(t, NULL, 0);
struct breakpoint *b = add_breakpoint(th->proc, address);
b->enabled = en;
+ b->tid = tid;
break;
}
} else {