diff options
author | Matt Hunter <m@lfurio.us> | 2025-08-25 02:47:44 -0400 |
---|---|---|
committer | Matt Hunter <m@lfurio.us> | 2025-09-07 21:03:26 -0400 |
commit | 9640f4b82b1030378bbf5e81ce205d0096cc6b73 (patch) | |
tree | 1c756c2f3846372d7b6ada9a548a2aee8a0d70c1 | |
parent | 1001499baec9e8d6fb25c641b2a0577ccd419d6f (diff) | |
download | misplays-9640f4b82b1030378bbf5e81ce205d0096cc6b73.tar.gz misplays-9640f4b82b1030378bbf5e81ce205d0096cc6b73.zip |
Allow multiple modifier chars in breakpoint CLI
Signed-off-by: Matt Hunter <m@lfurio.us>
-rw-r--r-- | misplays.c | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -391,15 +391,19 @@ 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++; + while (1) { + if (t[0] == '!') { + en = -1; + t++; + } else if (t[0] == '#') { + en = 0; + t++; + } else if (t[0] == '@') { + tid = th->id; + t++; + } else { + break; + } } unsigned long address = strtoul(t, NULL, 0); struct breakpoint *b = add_breakpoint(th->proc, address, 0); |