From 1e225492405c82b0b7b9973d8f549e1411168e3d Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 28 May 2010 18:00:46 +0000 Subject: [PATCH] gdb/ * 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 | 6 ++++++ gdb/linux-nat.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b7ca515b67..cf1b585102 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-05-28 Jan Kratochvil + + * 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 * ada-lang.c (ada_inferior_data): New struct. diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 8180248907..b0f79f108b 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -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; }