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/gdb-remote/ProcessGDBRemote.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/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 21dad4e11b6..263639904f1 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -2006,19 +2006,10 @@ ProcessGDBRemote::SetThreadStopInfo (lldb::tid_t tid, // If the current pc is a breakpoint site then the StopInfo should be set to Breakpoint // Otherwise, it will be set to Trace. - if (bp_site_sp) + if (bp_site_sp && bp_site_sp->ValidForThisThread(thread_sp.get())) { - // If the breakpoint is for this thread, then we'll report the hit, but if it is for another thread, - // we can just report no reason. - if (bp_site_sp->ValidForThisThread (thread_sp.get())) - { - thread_sp->SetStopInfo (StopInfo::CreateStopReasonWithBreakpointSiteID (*thread_sp, bp_site_sp->GetID())); - } - else - { - StopInfoSP invalid_stop_info_sp; - thread_sp->SetStopInfo (invalid_stop_info_sp); - } + thread_sp->SetStopInfo( + StopInfo::CreateStopReasonWithBreakpointSiteID(*thread_sp, bp_site_sp->GetID())); } else thread_sp->SetStopInfo (StopInfo::CreateStopReasonToTrace (*thread_sp)); |