aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2006-09-02 09:43:17 +0000
committerNick Roberts <nickrob@snap.net.nz>2006-09-02 09:43:17 +0000
commit5428d89199e54028de6e030718de1c5d538c1294 (patch)
tree6aa5d290f84a500c005b7f4a17545b67a8eda6a8
parentc6f81488500ee78aa58cb9674b1a0c864a8c8398 (diff)
downloadfsf-binutils-gdb-5428d89199e54028de6e030718de1c5d538c1294.zip
fsf-binutils-gdb-5428d89199e54028de6e030718de1c5d538c1294.tar.gz
fsf-binutils-gdb-5428d89199e54028de6e030718de1c5d538c1294.tar.bz2
(linux_nat_mourn_inferior): Destroy thread.
Clear any pending events
-rw-r--r--gdb/linux-nat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index b37f203..6925bfe 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -2381,6 +2381,9 @@ linux_nat_mourn_inferior (void)
{
trap_ptid = null_ptid;
+ if (target_can_async_p ())
+ gdb_inferior_destroy (gdb_status);
+
/* Destroy LWP info; it's no longer valid. */
init_lwp_list ();
@@ -2396,6 +2399,8 @@ linux_nat_mourn_inferior (void)
there are other viable forks to debug. Delete the exiting
one and context-switch to the first available. */
linux_fork_mourn_inferior ();
+
+ if (target_can_async_p ()) gdb_clear_pending_events ();
}
static LONGEST