[PATCH 0/2] Exit during detach

Andrew Burgess via Gdb-patches
2023-07-18T14:32:29Z

Ran into an issue in non-stop mode where an exit arriving during a
detach would cause GDB to crash.

---

Andrew Burgess (2):
gdb: fix possible nullptr dereference in a remote_debug_printf call
gdb: handle main thread exiting during detach

gdb/linux-nat.c | 19 ++-
gdb/remote.c | 23 ++-
.../main-thread-exit-during-detach.c | 59 ++++++++
.../main-thread-exit-during-detach.exp | 143 ++++++++++++++++++
gdbserver/mem-break.cc | 7 +
5 files changed, 241 insertions(+), 10 deletions(-)
create mode 100644 gdb/testsuite/gdb.threads/main-thread-exit-during-detach.c
create mode 100644 gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp

base-commit: b26b06dd42fbd9a75eebb4c943bf55a88562b81f
--
2.25.4