diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-04-21 09:45:30 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-05-30 15:07:26 -0400 |
commit | 8e7af8434581e325366c8ec4a30f33e8e1794310 (patch) | |
tree | f2073eea71cd755cc2bc51dc0520e9e5d23a0d3e /gdb/thread.c | |
parent | 30e7e0a917b44cbef439cb9c52fa41d21a5f8e44 (diff) | |
download | gdb-8e7af8434581e325366c8ec4a30f33e8e1794310.zip gdb-8e7af8434581e325366c8ec4a30f33e8e1794310.tar.gz gdb-8e7af8434581e325366c8ec4a30f33e8e1794310.tar.bz2 |
gdb: add interp::on_thread_exited method
Same idea as previous patches, but for thread_exited.
Change-Id: I4be974cbe58cf635453fef503c2d77c82522cbd9
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 223ba1d..b7b5d9f 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -191,6 +191,15 @@ clear_thread_inferior_resources (struct thread_info *tp) clear_inline_frame_state (tp); } +/* Notify interpreters and observers that thread T has exited. */ + +static void +notify_thread_exited (thread_info *t, int silent) +{ + interps_notify_thread_exited (t, silent); + gdb::observers::thread_exit.notify (t, silent); +} + /* See gdbthread.h. */ void @@ -213,7 +222,7 @@ set_thread_exited (thread_info *tp, bool silent) if (proc_target != nullptr) proc_target->maybe_remove_resumed_with_pending_wait_status (tp); - gdb::observers::thread_exit.notify (tp, silent); + notify_thread_exited (tp, silent); /* Tag it as exited. */ tp->state = THREAD_EXITED; |