diff options
author | Pedro Alves <palves@redhat.com> | 2009-03-25 21:53:11 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-03-25 21:53:11 +0000 |
commit | a07daef34e77308381c29146b83f8926520755e0 (patch) | |
tree | 8fb676dda3a39560c161a66eea96f0b12c8fea6d /gdb/mi | |
parent | d729566a19c83c452f3a962182d1c6d349562159 (diff) | |
download | gdb-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/mi')
-rw-r--r-- | gdb/mi/mi-interp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index dee921f..4775eec 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -55,7 +55,7 @@ static void mi_remove_notify_hooks (void); static void mi_on_normal_stop (struct bpstats *bs, int print_frame); static void mi_new_thread (struct thread_info *t); -static void mi_thread_exit (struct thread_info *t); +static void mi_thread_exit (struct thread_info *t, int silent); static void mi_new_inferior (int pid); static void mi_inferior_exit (int pid); static void mi_on_resume (ptid_t ptid); @@ -293,9 +293,14 @@ mi_new_thread (struct thread_info *t) } static void -mi_thread_exit (struct thread_info *t) +mi_thread_exit (struct thread_info *t, int silent) { - struct mi_interp *mi = top_level_interpreter_data (); + struct mi_interp *mi; + + if (silent) + return; + + mi = top_level_interpreter_data (); target_terminal_ours (); fprintf_unfiltered (mi->event_channel, "thread-exited,id=\"%d\",group-id=\"%d\"", |