diff options
Diffstat (limited to 'gdb/gdbserver/server.c')
-rw-r--r-- | gdb/gdbserver/server.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index a09841c..8f097e5 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -3959,9 +3959,11 @@ process_serial_event (void) discard_queued_stop_replies (pid_to_ptid (pid)); write_ok (own_buf); - if (extended_protocol) + if (extended_protocol || target_running ()) { - /* Treat this like a normal program exit. */ + /* There is still at least one inferior remaining or + we are in extended mode, so don't terminate gdbserver, + and instead treat this like a normal program exit. */ last_status.kind = TARGET_WAITKIND_EXITED; last_status.value.integer = 0; last_ptid = pid_to_ptid (pid); |