]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
btrace: stopped_by_*() consider the selected thread
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 25 Oct 2024 14:15:59 +0000 (14:15 +0000)
committerMarkus Metzger <markus.t.metzger@intel.com>
Mon, 26 May 2025 07:01:15 +0000 (07:01 +0000)
In stopped_by_sw_breakpoint() and stopped_by_hw_breakpoint(), we check
whether any thread is replaying.  This is unnecessary as it only matters
if inferior_ptid is replaying.

Narrow the check to inferior_ptid.

gdb/record-btrace.c

index 4a4465b126b3a408f536381f704346fc1d939bc3..42927f318b8dd150872f1f78197c5512777c5f11 100644 (file)
@@ -2762,7 +2762,7 @@ record_btrace_target::can_execute_reverse ()
 bool
 record_btrace_target::stopped_by_sw_breakpoint ()
 {
-  if (record_is_replaying (minus_one_ptid))
+  if (record_is_replaying (inferior_ptid))
     {
       struct thread_info *tp = inferior_thread ();
 
@@ -2777,7 +2777,7 @@ record_btrace_target::stopped_by_sw_breakpoint ()
 bool
 record_btrace_target::stopped_by_hw_breakpoint ()
 {
-  if (record_is_replaying (minus_one_ptid))
+  if (record_is_replaying (inferior_ptid))
     {
       struct thread_info *tp = inferior_thread ();