diff options
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/server.c | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 531bc6c..8f50ce0 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2010-07-07 Joel Brobecker <brobecker@adacore.com> + + * server.c (handle_v_cont): Call mourn_inferior if process + just exited. + (myresume): Likewise. + 2010-07-01 Pedro Alves <pedro@codesourcery.com> Static tracepoints, and integration with UST. diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 226d123..9125f0e 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -1779,6 +1779,10 @@ handle_v_cont (char *own_buf) last_ptid = mywait (minus_one_ptid, &last_status, 0, 1); prepare_resume_reply (own_buf, last_ptid, &last_status); disable_async_io (); + + if (last_status.kind == TARGET_WAITKIND_EXITED + || last_status.kind == TARGET_WAITKIND_SIGNALLED) + mourn_inferior (find_process_pid (ptid_get_pid (last_ptid))); } return; @@ -2079,6 +2083,10 @@ myresume (char *own_buf, int step, int sig) last_ptid = mywait (minus_one_ptid, &last_status, 0, 1); prepare_resume_reply (own_buf, last_ptid, &last_status); disable_async_io (); + + if (last_status.kind == TARGET_WAITKIND_EXITED + || last_status.kind == TARGET_WAITKIND_SIGNALLED) + mourn_inferior (find_process_pid (ptid_get_pid (last_ptid))); } } |