If ThreadPlanCallFunction hasn't set its notion of the "real stop info" yet, just return the current PrivateStopInfo.
Also renamed a few more places where we were using StopReason in functions that were returning StopInfo's.
<rdar://problem/14042692>
llvm-svn: 183177
diff --git a/lldb/source/Target/ThreadPlanBase.cpp b/lldb/source/Target/ThreadPlanBase.cpp
index 998cc08..240f23a 100644
--- a/lldb/source/Target/ThreadPlanBase.cpp
+++ b/lldb/source/Target/ThreadPlanBase.cpp
@@ -102,10 +102,10 @@
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
- StopInfoSP stop_info_sp = GetPrivateStopReason();
+ StopInfoSP stop_info_sp = GetPrivateStopInfo ();
if (stop_info_sp)
{
- StopReason reason = stop_info_sp->GetStopReason();
+ StopReason reason = stop_info_sp->GetStopReason ();
switch (reason)
{
case eStopReasonInvalid:
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp
index 2b5af7c..c9baaaf 100644
--- a/lldb/source/Target/ThreadPlanCallFunction.cpp
+++ b/lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -298,7 +298,7 @@
log->Printf ("ThreadPlanCallFunction(%p): DoTakedown called for thread 0x%4.4" PRIx64 ", m_valid: %d complete: %d.\n", this, m_thread.GetID(), m_valid, IsPlanComplete());
m_takedown_done = true;
m_stop_address = m_thread.GetStackFrameAtIndex(0)->GetRegisterContext()->GetPC();
- m_real_stop_info_sp = GetPrivateStopReason();
+ m_real_stop_info_sp = GetPrivateStopInfo ();
m_thread.RestoreRegisterStateFromCheckpoint(m_stored_thread_state);
SetPlanComplete(success);
ClearBreakpoints();
@@ -365,7 +365,7 @@
ThreadPlanCallFunction::DoPlanExplainsStop (Event *event_ptr)
{
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP|LIBLLDB_LOG_PROCESS));
- m_real_stop_info_sp = GetPrivateStopReason();
+ m_real_stop_info_sp = GetPrivateStopInfo ();
// If our subplan knows why we stopped, even if it's done (which would forward the question to us)
// we answer yes.
@@ -584,7 +584,7 @@
bool
ThreadPlanCallFunction::BreakpointsExplainStop()
{
- StopInfoSP stop_info_sp = GetPrivateStopReason();
+ StopInfoSP stop_info_sp = GetPrivateStopInfo ();
if ((m_cxx_language_runtime &&
m_cxx_language_runtime->ExceptionBreakpointsExplainStop(stop_info_sp))
diff --git a/lldb/source/Target/ThreadPlanCallUserExpression.cpp b/lldb/source/Target/ThreadPlanCallUserExpression.cpp
index 6e47808..70de1cb 100644
--- a/lldb/source/Target/ThreadPlanCallUserExpression.cpp
+++ b/lldb/source/Target/ThreadPlanCallUserExpression.cpp
@@ -67,12 +67,16 @@
ThreadPlanCallUserExpression::GetRealStopInfo()
{
StopInfoSP stop_info_sp = ThreadPlanCallFunction::GetRealStopInfo();
- lldb::addr_t addr = GetStopAddress();
- DynamicCheckerFunctions *checkers = m_thread.GetProcess()->GetDynamicCheckers();
- StreamString s;
- if (checkers && checkers->DoCheckersExplainStop(addr, s))
- stop_info_sp->SetDescription(s.GetData());
+ if (stop_info_sp)
+ {
+ lldb::addr_t addr = GetStopAddress();
+ DynamicCheckerFunctions *checkers = m_thread.GetProcess()->GetDynamicCheckers();
+ StreamString s;
+
+ if (checkers && checkers->DoCheckersExplainStop(addr, s))
+ stop_info_sp->SetDescription(s.GetData());
+ }
return stop_info_sp;
}
diff --git a/lldb/source/Target/ThreadPlanStepInRange.cpp b/lldb/source/Target/ThreadPlanStepInRange.cpp
index c5bb144..b7ebfea 100644
--- a/lldb/source/Target/ThreadPlanStepInRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepInRange.cpp
@@ -403,7 +403,7 @@
}
else
{
- StopInfoSP stop_info_sp = GetPrivateStopReason();
+ StopInfoSP stop_info_sp = GetPrivateStopInfo ();
if (stop_info_sp)
{
StopReason reason = stop_info_sp->GetStopReason();
diff --git a/lldb/source/Target/ThreadPlanStepInstruction.cpp b/lldb/source/Target/ThreadPlanStepInstruction.cpp
index fa45b2b..f7a962e 100644
--- a/lldb/source/Target/ThreadPlanStepInstruction.cpp
+++ b/lldb/source/Target/ThreadPlanStepInstruction.cpp
@@ -83,7 +83,7 @@
bool
ThreadPlanStepInstruction::DoPlanExplainsStop (Event *event_ptr)
{
- StopInfoSP stop_info_sp = GetPrivateStopReason();
+ StopInfoSP stop_info_sp = GetPrivateStopInfo ();
if (stop_info_sp)
{
StopReason reason = stop_info_sp->GetStopReason();
diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp
index 86f99b2..71ccf80 100644
--- a/lldb/source/Target/ThreadPlanStepOut.cpp
+++ b/lldb/source/Target/ThreadPlanStepOut.cpp
@@ -200,7 +200,7 @@
// We don't explain signals or breakpoints (breakpoints that handle stepping in or
// out will be handled by a child plan.
- StopInfoSP stop_info_sp = GetPrivateStopReason();
+ StopInfoSP stop_info_sp = GetPrivateStopInfo ();
if (stop_info_sp)
{
StopReason reason = stop_info_sp->GetStopReason();
diff --git a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
index ff4fee7..dc011e5 100644
--- a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
+++ b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
@@ -61,7 +61,7 @@
bool
ThreadPlanStepOverBreakpoint::DoPlanExplainsStop (Event *event_ptr)
{
- StopInfoSP stop_info_sp = GetPrivateStopReason();
+ StopInfoSP stop_info_sp = GetPrivateStopInfo ();
if (stop_info_sp)
{
StopReason reason = stop_info_sp->GetStopReason();
diff --git a/lldb/source/Target/ThreadPlanStepOverRange.cpp b/lldb/source/Target/ThreadPlanStepOverRange.cpp
index 3381292..679ef46 100644
--- a/lldb/source/Target/ThreadPlanStepOverRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepOverRange.cpp
@@ -300,7 +300,7 @@
// unexplained breakpoint/crash.
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
- StopInfoSP stop_info_sp = GetPrivateStopReason();
+ StopInfoSP stop_info_sp = GetPrivateStopInfo ();
bool return_value;
if (stop_info_sp)
diff --git a/lldb/source/Target/ThreadPlanStepUntil.cpp b/lldb/source/Target/ThreadPlanStepUntil.cpp
index ca3d30d..7f35d04 100644
--- a/lldb/source/Target/ThreadPlanStepUntil.cpp
+++ b/lldb/source/Target/ThreadPlanStepUntil.cpp
@@ -176,7 +176,7 @@
if (m_ran_analyze)
return;
- StopInfoSP stop_info_sp = GetPrivateStopReason();
+ StopInfoSP stop_info_sp = GetPrivateStopInfo ();
m_should_stop = true;
m_explains_stop = false;
@@ -320,7 +320,7 @@
// do so here. Otherwise, as long as this thread has stopped for a reason,
// we will stop.
- StopInfoSP stop_info_sp = GetPrivateStopReason();
+ StopInfoSP stop_info_sp = GetPrivateStopInfo ();
if (!stop_info_sp || stop_info_sp->GetStopReason() == eStopReasonNone)
return false;