gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 28 May 2010 18:00:46 +0000 (18:00 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 28 May 2010 18:00:46 +0000 (18:00 +0000)
* linux-nat.c (linux_nat_wait_1): Do not call
linux_nat_core_of_thread_1 on TARGET_WAITKIND_EXITED or
TARGET_WAITKIND_SIGNALLED.

gdb/ChangeLog
gdb/linux-nat.c

index b7ca515b67c16d9fe56d324e8a700509c44e3d7e..cf1b5851020990a3efd3de3c77a1a7a0fbd26e8d 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * linux-nat.c (linux_nat_wait_1): Do not call
+       linux_nat_core_of_thread_1 on TARGET_WAITKIND_EXITED or
+       TARGET_WAITKIND_SIGNALLED.
+
 2010-05-27  Joel Brobecker  <brobecker@adacore.com>
 
        * ada-lang.c (ada_inferior_data): New struct.
index 81802489074547625af200f696c3c1bc6f131f62..b0f79f108bd51fba57e640bec30675445bf4535e 100644 (file)
@@ -3626,7 +3626,13 @@ retry:
     fprintf_unfiltered (gdb_stdlog, "LLW: exit\n");
 
   restore_child_signals_mask (&prev_mask);
-  lp->core = linux_nat_core_of_thread_1 (lp->ptid);
+
+  if (ourstatus->kind == TARGET_WAITKIND_EXITED
+      || ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
+    lp->core = -1;
+  else
+    lp->core = linux_nat_core_of_thread_1 (lp->ptid);
+
   return lp->ptid;
 }