aboutsummaryrefslogtreecommitdiff
path: root/gdb/bsd-uthread.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2007-07-06 11:39:44 +0000
committerMark Kettenis <kettenis@gnu.org>2007-07-06 11:39:44 +0000
commita4e7b2e7cfc6e8a3a81c3c3c609d7c092c41ea2b (patch)
treef1e1e8beed2267e666f4df919f566a4e0ee5b40a /gdb/bsd-uthread.c
parenta208b53c494bf6c96289fa81f9eb79f9bed27f1c (diff)
downloadgdb-a4e7b2e7cfc6e8a3a81c3c3c609d7c092c41ea2b.zip
gdb-a4e7b2e7cfc6e8a3a81c3c3c609d7c092c41ea2b.tar.gz
gdb-a4e7b2e7cfc6e8a3a81c3c3c609d7c092c41ea2b.tar.bz2
* bsd-uthread.c (bsd_uthread_wait): Don't try to fetch thread IDs
for terminated processes.
Diffstat (limited to 'gdb/bsd-uthread.c')
-rw-r--r--gdb/bsd-uthread.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c
index 172192e..bb01816 100644
--- a/gdb/bsd-uthread.c
+++ b/gdb/bsd-uthread.c
@@ -337,6 +337,12 @@ bsd_uthread_wait (ptid_t ptid, struct target_waitstatus *status)
/* Pass the request to the layer beneath. */
ptid = find_target_beneath (bsd_uthread_ops_hack)->to_wait (ptid, status);
+ /* If the process is no longer alive, there's no point in figuring
+ out the thread ID. It will fail anyway. */
+ if (status->kind == TARGET_WAITKIND_SIGNALLED
+ || status->kind == TARGET_WAITKIND_EXITED)
+ return ptid;
+
/* Fetch the corresponding thread ID, and augment the returned
process ID with it. */
addr = read_memory_typed_address (bsd_uthread_thread_run_addr,