{
for (thread_info *tp : all_non_exited_threads (resume_ptid))
{
+ switch_to_thread_no_regs (tp);
+
/* Ignore the current thread here. It's handled
afterwards. */
if (tp == cur_thr)
thread_step_over_chain_enqueue (tp);
}
+
+ switch_to_thread (cur_thr);
}
/* Enqueue the current thread last, so that we move all other
Start all other threads that are implicitly resumed too. */
for (thread_info *tp : all_non_exited_threads (resume_ptid))
{
+ switch_to_thread_no_regs (tp);
+
if (tp->resumed)
{
if (debug_infrun)
"infrun: %s executing, "
"need stop\n",
target_pid_to_str (t->ptid).c_str ());
+ switch_to_thread_no_regs (t);
target_stop (t->ptid);
t->stop_requested = 1;
}
for (thread_info *tp : all_non_exited_threads ())
{
+ switch_to_thread_no_regs (tp);
+
if (tp == event_thread)
{
if (debug_infrun)
{
struct regcache *regcache = get_thread_regcache (ecs->event_thread);
struct gdbarch *reg_gdbarch = regcache->arch ();
- scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid);
- inferior_ptid = ecs->ptid;
+ switch_to_thread (ecs->event_thread);
fprintf_unfiltered (gdb_stdlog, "infrun: stop_pc = %s\n",
paddress (reg_gdbarch,
for (thread_info *tp : all_non_exited_threads ())
{
+ switch_to_thread_no_regs (tp);
+
/* Ignore threads of processes the caller is not
resuming. */
if (!sched_multi
return 1;
}
}
+
+ switch_to_thread (ecs->event_thread);
}
return 0;