diff options
author | Pavel Labath <labath@google.com> | 2016-02-02 10:40:56 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-02-02 10:40:56 +0000 |
commit | efd04a6c755af24e0909f42f60ea1cc671840310 (patch) | |
tree | 072900e53fc2eabf038de42d330e925f98923658 /lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp | |
parent | b618a985821ffcdf65b84eec5f3d50677efef776 (diff) | |
download | bcm5719-llvm-efd04a6c755af24e0909f42f60ea1cc671840310.tar.gz bcm5719-llvm-efd04a6c755af24e0909f42f60ea1cc671840310.zip |
Fix single-stepping onto a breakpoint
Summary:
r259344 introduced a bug, where we fail to perform a single step, when the instruction we are
stepping onto contains a breakpoint which is not valid for this thread. This fixes the problem
and add a test case.
Reviewers: tberghammer, emaste
Subscribers: abhishek.aggarwal, lldb-commits, emaste
Differential Revision: http://reviews.llvm.org/D16767
llvm-svn: 259488
Diffstat (limited to 'lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp index 46cf2bd2a78..3cb1cec6983 100644 --- a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp @@ -569,20 +569,11 @@ FreeBSDThread::TraceNotify(const ProcessMessage &message) // If the current pc is a breakpoint site then set the StopInfo to Breakpoint. // Otherwise, set the StopInfo to Watchpoint or Trace. - if (bp_site) - { - lldb::break_id_t bp_id = bp_site->GetID(); - // If we have an operating system plug-in, we might have set a thread specific breakpoint using the - // operating system thread ID, so we can't make any assumptions about the thread ID so we must always - // report the breakpoint regardless of the thread. - if (bp_site->ValidForThisThread(this) || GetProcess()->GetOperatingSystem () != NULL) - SetStopInfo (StopInfo::CreateStopReasonWithBreakpointSiteID(*this, bp_id)); - else - { - const bool should_stop = false; - SetStopInfo (StopInfo::CreateStopReasonWithBreakpointSiteID(*this, bp_id, should_stop)); - } - } + // If we have an operating system plug-in, we might have set a thread specific breakpoint using the + // operating system thread ID, so we can't make any assumptions about the thread ID so we must always + // report the breakpoint regardless of the thread. + if (bp_site && (bp_site->ValidForThisThread(this) || GetProcess()->GetOperatingSystem () != NULL)) + SetStopInfo(StopInfo::CreateStopReasonWithBreakpointSiteID(*this, bp_site->GetID())); else { POSIXBreakpointProtocol* reg_ctx = GetPOSIXBreakpointProtocol(); |