diff options
author | Adrian McCarthy <amccarth@google.com> | 2016-02-02 23:38:08 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2016-02-02 23:38:08 +0000 |
commit | 12a8ae23b0819972a1476bcf9cd7ba0e455e6768 (patch) | |
tree | 62a10ee2480a951e59762ebf1ba324b86b6db7de /lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp | |
parent | 83c2ecf9faa7fe575661b243d12175d78d04376f (diff) | |
download | bcm5719-llvm-12a8ae23b0819972a1476bcf9cd7ba0e455e6768.tar.gz bcm5719-llvm-12a8ae23b0819972a1476bcf9cd7ba0e455e6768.zip |
Set correct thread stop info when single-step lands on a breakpoint [Windows]
I don't understand how this worked before, but this fixes the recent test regressions on Windows in TestConsecutiveBreakpoints.py.
Differential Revision: http://reviews.llvm.org/D16825
llvm-svn: 259605
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp b/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp index 855289d67bc..3a6303d989c 100644 --- a/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp +++ b/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp @@ -554,11 +554,25 @@ ProcessWindowsLive::RefreshStateAfterStop() { case EXCEPTION_SINGLE_STEP: { - stop_info = StopInfo::CreateStopReasonToTrace(*stop_thread); - stop_thread->SetStopInfo(stop_info); - WINLOG_IFANY(WINDOWS_LOG_EXCEPTION | WINDOWS_LOG_STEP, "RefreshStateAfterStop single stepping thread %u", - stop_thread->GetID()); - stop_thread->SetStopInfo(stop_info); + RegisterContextSP register_context = stop_thread->GetRegisterContext(); + const uint64_t pc = register_context->GetPC(); + BreakpointSiteSP site(GetBreakpointSiteList().FindByAddress(pc)); + if (site && site->ValidForThisThread(stop_thread.get())) + { + WINLOG_IFANY(WINDOWS_LOG_BREAKPOINTS | WINDOWS_LOG_EXCEPTION | WINDOWS_LOG_STEP, + "Single-stepped onto a breakpoint in process %I64u at " + "address 0x%I64x with breakpoint site %d", + m_session_data->m_debugger->GetProcess().GetProcessId(), pc, site->GetID()); + stop_info = StopInfo::CreateStopReasonWithBreakpointSiteID(*stop_thread, site->GetID()); + stop_thread->SetStopInfo(stop_info); + } + else + { + WINLOG_IFANY(WINDOWS_LOG_EXCEPTION | WINDOWS_LOG_STEP, + "RefreshStateAfterStop single stepping thread %u", stop_thread->GetID()); + stop_info = StopInfo::CreateStopReasonToTrace(*stop_thread); + stop_thread->SetStopInfo(stop_info); + } return; } |