Skip to content

Commit 5b5a5b6

Browse files
committed
Revert "Add pc check for instruction stepping by breakpoints"
Landing this in a separate PR llvm#108504 This reverts commit 48a0fc1.
1 parent 087aef1 commit 5b5a5b6

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,9 @@ void NativeProcessFreeBSD::MonitorSIGTRAP(lldb::pid_t pid) {
319319
info.pl_siginfo.si_addr);
320320

321321
if (thread) {
322-
auto &regctx = static_cast<NativeRegisterContextFreeBSD &>(
323-
thread->GetRegisterContext());
324322
auto thread_info =
325323
m_threads_stepping_with_breakpoint.find(thread->GetID());
326-
if (thread_info != m_threads_stepping_with_breakpoint.end() &&
327-
threads_info->second == regctx.GetPC()) {
324+
if (thread_info != m_threads_stepping_with_breakpoint.end()) {
328325
thread->SetStoppedByTrace();
329326
Status brkpt_error = RemoveBreakpoint(thread_info->second);
330327
if (brkpt_error.Fail())

lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -829,11 +829,8 @@ void NativeProcessLinux::MonitorBreakpoint(NativeThreadLinux &thread) {
829829
thread.SetStoppedByBreakpoint();
830830
FixupBreakpointPCAsNeeded(thread);
831831

832-
NativeRegisterContextLinux &reg_ctx = thread.GetRegisterContext();
833-
auto stepping_with_bp_it =
834-
m_threads_stepping_with_breakpoint.find(thread.GetID());
835-
if (stepping_with_bp_it != m_threads_stepping_with_breakpoint.end() &&
836-
stepping_with_bp_it->second == reg_ctx.GetPC())
832+
if (m_threads_stepping_with_breakpoint.find(thread.GetID()) !=
833+
m_threads_stepping_with_breakpoint.end())
837834
thread.SetStoppedByTrace();
838835

839836
StopRunningThreads(thread.GetID());

0 commit comments

Comments
 (0)