[Lldb-commits] [PATCH] D18692: Fix a cornercase in breakpoint reporting
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 1 06:17:26 PDT 2016
labath updated this revision to Diff 52357.
labath added a comment.
I've realized that some foreign stubs may not send the "reason" field, so I limit the scope of this change to cases where "signal" is zero as well.
@@ -2089,6 +2089,23 @@
handled = true;
+ else if (!signo)
+ addr_t pc = thread_sp->GetRegisterContext()->GetPC();
+ lldb::BreakpointSiteSP bp_site_sp =
+ // If the current pc is a breakpoint site then the StopInfo should be set to Breakpoint
+ // even though the remote stub did not set it as such. This can happen when
+ // the thread is involuntarily interrupted (e.g. due to stops on other
+ // threads) just as it is about to execute the breakpoint instruction.
+ if (bp_site_sp && bp_site_sp->ValidForThisThread(thread_sp.get()))
+ StopInfo::CreateStopReasonWithBreakpointSiteID(*thread_sp, bp_site_sp->GetID()));
+ handled = true;
if (!handled && signo && did_exec == false)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1544 bytes
Desc: not available
More information about the lldb-commits