This revision was automatically updated to reflect the committed changes.
Closed by commit rL265525: Fix a cornercase in breakpoint reporting (authored
by labath).
Changed prior to commit:
http://reviews.llvm.org/D18692?vs=52357&id=52771#toc
Repository:
rL LLVM
http://reviews.llvm.org/D18692
Files:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2089,6 +2089,23 @@
handled = true;
}
}
+ else if (!signo)
+ {
+ addr_t pc = thread_sp->GetRegisterContext()->GetPC();
+ lldb::BreakpointSiteSP bp_site_sp =
+
thread_sp->GetProcess()->GetBreakpointSiteList().FindByAddress(pc);
+
+ // 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()))
+ {
+ thread_sp->SetStopInfo(
+
StopInfo::CreateStopReasonWithBreakpointSiteID(*thread_sp,
bp_site_sp->GetID()));
+ handled = true;
+ }
+ }
if (!handled && signo && did_exec == false)
{
Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2089,6 +2089,23 @@
handled = true;
}
}
+ else if (!signo)
+ {
+ addr_t pc = thread_sp->GetRegisterContext()->GetPC();
+ lldb::BreakpointSiteSP bp_site_sp =
+ thread_sp->GetProcess()->GetBreakpointSiteList().FindByAddress(pc);
+
+ // 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()))
+ {
+ thread_sp->SetStopInfo(
+ StopInfo::CreateStopReasonWithBreakpointSiteID(*thread_sp, bp_site_sp->GetID()));
+ handled = true;
+ }
+ }
if (!handled && signo && did_exec == false)
{
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits