[Lldb-commits] [PATCH] D16825: [Windows] Set correct thread stop info when single-step lands on a breakpoint
Adrian McCarthy via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 2 15:42:22 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL259605: Set correct thread stop info when single-step lands on a breakpoint [Windows] (authored by amccarth).
Changed prior to commit:
http://reviews.llvm.org/D16825?vs=46702&id=46715#toc
Repository:
rL LLVM
http://reviews.llvm.org/D16825
Files:
lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp
Index: lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp
+++ lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp
@@ -554,11 +554,25 @@
{
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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16825.46715.patch
Type: text/x-patch
Size: 1950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160202/a88f4a9f/attachment.bin>
More information about the lldb-commits
mailing list