From 07fe1be26cb445ee254c962ddf382a702ff68c95 Mon Sep 17 00:00:00 2001 From: Markus Metzger Date: Fri, 25 Oct 2024 13:53:04 +0000 Subject: [PATCH] btrace, infrun: replay scheduler locking only depends on to-be-resumed thread 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. Approved-By: Tom Tromey --- gdb/infrun.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 99362fe09e9..a85aaa3842e 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3200,8 +3200,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