mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
gdb: use correct target in notify_thread_exited()
clean_up_just_stopped_threads_fsms() may call notify_thread_exited() in the context of a thread from a different target. Switch to the thread's inferior to get the target right. Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
parent
cd52261cfb
commit
aca091c462
1 changed files with 3 additions and 0 deletions
|
|
@ -203,6 +203,9 @@ notify_thread_exited (thread_info *t, std::optional<ULONGEST> exit_code,
|
|||
{
|
||||
if (!silent && print_thread_events)
|
||||
{
|
||||
/* Switch inferior before the target calls below. */
|
||||
auto restore_inf = maybe_switch_inferior (t->inf);
|
||||
|
||||
if (exit_code.has_value ())
|
||||
gdb_printf (_("[%s (id %s) exited with code %s]\n"),
|
||||
target_pid_to_str (t->ptid).c_str (),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue