]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
btrace, infrun: replay scheduler locking only depends on to-be-resumed thread
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 25 Oct 2024 13:53:04 +0000 (13:53 +0000)
committerMarkus Metzger <markus.t.metzger@intel.com>
Mon, 26 May 2025 07:01:15 +0000 (07:01 +0000)
Similar to the parent commit, simplify schedlock_applies() by only
checking the argument thread.

When resuming that thread, GDB will automatically stop replaying its
inferior.  The replay state of other inferiors is not considered by
user_visible_resume_ptid(), so let's not consider them in
schedlock_applies(), either.

gdb/infrun.c

index dccd72dc308c7fb7e936e9b2d8db6bb196618c69..9b26ba88621014e4c31d4f47f7567705b37442a7 100644 (file)
@@ -3195,8 +3195,7 @@ schedlock_applies (struct thread_info *tp)
          || (scheduler_mode == schedlock_step
              && tp->control.stepping_command)
          || (scheduler_mode == schedlock_replay
-             && target_record_will_replay (minus_one_ptid,
-                                           execution_direction)));
+             && target_record_will_replay (tp->ptid, execution_direction)));
 }
 
 /* When FORCE_P is false, set process_stratum_target::COMMIT_RESUMED_STATE