static void
record_btrace_enable_warn (struct thread_info *tp)
{
+ /* Ignore this thread if its inferior is not recorded by us. */
+ target_ops *rec = tp->inf->target_at (record_stratum);
+ if (rec != &record_btrace_ops)
+ return;
+
try
{
btrace_enable (tp, &record_btrace_conf);
if (!target_has_execution)
error (_("The program is not being run."));
- for (thread_info *tp : all_non_exited_threads ())
+ for (thread_info *tp : current_inferior ()->non_exited_threads ())
if (args == NULL || *args == 0 || number_is_in_list (args, tp->global_num))
{
btrace_enable (tp, &record_btrace_conf);
record_btrace_auto_disable ();
- for (thread_info *tp : all_non_exited_threads ())
+ for (thread_info *tp : current_inferior ()->non_exited_threads ())
if (tp->btrace.target != NULL)
btrace_disable (tp);
}
/* We should have already stopped recording.
Tear down btrace in case we have not. */
- for (thread_info *tp : all_non_exited_threads ())
+ for (thread_info *tp : current_inferior ()->non_exited_threads ())
btrace_teardown (tp);
}
/* Stop all other threads. */
if (!target_is_non_stop_p ())
{
- for (thread_info *tp : all_non_exited_threads ())
+ for (thread_info *tp : current_inferior ()->non_exited_threads ())
record_btrace_cancel_resume (tp);
}
void
record_btrace_target::record_stop_replaying ()
{
- for (thread_info *tp : all_non_exited_threads ())
+ for (thread_info *tp : current_inferior ()->non_exited_threads ())
record_btrace_stop_replaying (tp);
}