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 | 30e7e0a917b44cbef439cb9c52fa41d21a5f8e44 (patch) | |
tree | bbb9cbadedbf0e748df1183ebd83be97cd32751b /gdb/thread.c | |
parent | 77cd03e27c547a5b5b7f086a0b537084eb399258 (diff) | |
download | binutils-30e7e0a917b44cbef439cb9c52fa41d21a5f8e44.zip binutils-30e7e0a917b44cbef439cb9c52fa41d21a5f8e44.tar.gz binutils-30e7e0a917b44cbef439cb9c52fa41d21a5f8e44.tar.bz2 |
gdb: add interp::on_new_thread method
Same idea as previous patches, but for new_thread.
Change-Id: Ib70ae3421b736fd69d86c4e7c708bec349aa256c
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 13db9f8..223ba1d 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -49,6 +49,7 @@ #include "gdbsupport/gdb_optional.h" #include "inline-frame.h" #include "stack.h" +#include "interps.h" /* See gdbthread.h. */ @@ -260,6 +261,15 @@ new_thread (struct inferior *inf, ptid_t ptid) return tp; } +/* Notify interpreters and observers that thread T has been created. */ + +static void +notify_new_thread (thread_info *t) +{ + interps_notify_new_thread (t); + gdb::observers::new_thread.notify (t); +} + struct thread_info * add_thread_silent (process_stratum_target *targ, ptid_t ptid) { @@ -280,7 +290,7 @@ add_thread_silent (process_stratum_target *targ, ptid_t ptid) delete_thread (tp); tp = new_thread (inf, ptid); - gdb::observers::new_thread.notify (tp); + notify_new_thread (tp); return tp; } |