If multiple threads hit a breakpoint at the same time, GDB gets confused [1]. Prevent this situation by stopping the other threads once a thread hits a breakpoint.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=32023 Signed-off-by: Ilya Leoshkevich <[email protected]> --- gdbstub/user.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdbstub/user.c b/gdbstub/user.c index 0b4bfa9c488..d72f8ca6106 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -200,6 +200,8 @@ int gdb_handlesig(CPUState *cpu, int sig, const char *reason, void *siginfo, char buf[256]; int n; + EXCLUSIVE_GUARD(); + if (!gdbserver_state.init || gdbserver_user_state.fd < 0) { return sig; } -- 2.47.1
