From: Nick Roberts Date: Sat, 2 Sep 2006 09:43:17 +0000 (+0000) Subject: (linux_nat_mourn_inferior): Destroy thread. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5428d89199e54028de6e030718de1c5d538c1294;p=thirdparty%2Fbinutils-gdb.git (linux_nat_mourn_inferior): Destroy thread. Clear any pending events --- diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index b37f20389c9..6925bfee5f6 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