From: Markus Metzger Date: Fri, 25 Oct 2024 14:15:59 +0000 (+0000) Subject: btrace: stopped_by_*() consider the selected thread X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db9809ed6b9502b76fc25e53a8ff9f63f9c8218e;p=thirdparty%2Fbinutils-gdb.git btrace: stopped_by_*() consider the selected thread 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. --- diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index 4a4465b126b..42927f318b8 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -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 ();