aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-03-25 21:53:11 +0000
committerPedro Alves <palves@redhat.com>2009-03-25 21:53:11 +0000
commita07daef34e77308381c29146b83f8926520755e0 (patch)
tree8fb676dda3a39560c161a66eea96f0b12c8fea6d /gdb/infrun.c
parentd729566a19c83c452f3a962182d1c6d349562159 (diff)
downloadgdb-a07daef34e77308381c29146b83f8926520755e0.zip
gdb-a07daef34e77308381c29146b83f8926520755e0.tar.gz
gdb-a07daef34e77308381c29146b83f8926520755e0.tar.bz2
gdb/
* infrun.c (infrun_thread_thread_exit): New. (_initialize_infrun): Attach it to the thread_exit observer. * thread.c (delete_thread_1): Always call the observer, passing it the silent flag. * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter. If SILENT, return immediately. gdb/doc/ * observer.texi (thread_exit): Add "silent" parameter.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 4e270fc..7a9f4e9 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1691,6 +1691,15 @@ infrun_thread_stop_requested (ptid_t ptid)
iterate_over_threads (infrun_thread_stop_requested_callback, &ptid);
}
+void nullify_last_target_wait_ptid (void);
+
+static void
+infrun_thread_thread_exit (struct thread_info *tp, int silent)
+{
+ if (ptid_equal (target_last_wait_ptid, tp->ptid))
+ nullify_last_target_wait_ptid ();
+}
+
/* Callback for iterate_over_threads. */
static int
@@ -5575,6 +5584,7 @@ Options are 'forward' or 'reverse'."),
observer_attach_thread_ptid_changed (infrun_thread_ptid_changed);
observer_attach_thread_stop_requested (infrun_thread_stop_requested);
+ observer_attach_thread_exit (infrun_thread_thread_exit);
/* Explicitly create without lookup, since that tries to create a
value with a void typed value, and when we get here, gdbarch