summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanShouldStopHere.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-07-18 21:48:26 +0000
committerJim Ingham <jingham@apple.com>2013-07-18 21:48:26 +0000
commit4d56e9c1cb7c010ed1bccff952fc5c879bd1aba6 (patch)
treee274891b824d661bf9ca99d3bef0d2eb22011208 /lldb/source/Target/ThreadPlanShouldStopHere.cpp
parent5937ec7502cebb8f56d15a6a3183ab69ef43ff29 (diff)
downloadbcm5719-llvm-4d56e9c1cb7c010ed1bccff952fc5c879bd1aba6.tar.gz
bcm5719-llvm-4d56e9c1cb7c010ed1bccff952fc5c879bd1aba6.zip
This commit does two things. One, it converts the return value of the QueueThreadPlanXXX
plan providers from a "ThreadPlan *" to a "lldb::ThreadPlanSP". That was needed to fix a bug where the ThreadPlanStepInRange wasn't checking with its sub-plans to make sure they succeed before trying to proceed further. If the sub-plan failed and as a result didn't make any progress, you could end up retrying the same failing algorithm in an infinite loop. <rdar://problem/14043602> llvm-svn: 186618
Diffstat (limited to 'lldb/source/Target/ThreadPlanShouldStopHere.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanShouldStopHere.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Target/ThreadPlanShouldStopHere.cpp b/lldb/source/Target/ThreadPlanShouldStopHere.cpp
index 71543ae1341..87662345a06 100644
--- a/lldb/source/Target/ThreadPlanShouldStopHere.cpp
+++ b/lldb/source/Target/ThreadPlanShouldStopHere.cpp
@@ -45,21 +45,21 @@ ThreadPlanShouldStopHere::SetShouldStopHereCallback (ThreadPlanShouldStopHereCal
m_baton = baton;
}
-ThreadPlan *
+ThreadPlanSP
ThreadPlanShouldStopHere::InvokeShouldStopHereCallback ()
{
if (m_callback)
{
- ThreadPlan *return_plan = m_callback (m_owner, m_flags, m_baton);
+ ThreadPlanSP return_plan_sp(m_callback (m_owner, m_flags, m_baton));
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
{
lldb::addr_t current_addr = m_owner->GetThread().GetRegisterContext()->GetPC(0);
- if (return_plan)
+ if (return_plan_sp)
{
StreamString s;
- return_plan->GetDescription (&s, lldb::eDescriptionLevelFull);
+ return_plan_sp->GetDescription (&s, lldb::eDescriptionLevelFull);
log->Printf ("ShouldStopHere callback found a step out plan from 0x%" PRIx64 ": %s.", current_addr, s.GetData());
}
else
@@ -67,8 +67,8 @@ ThreadPlanShouldStopHere::InvokeShouldStopHereCallback ()
log->Printf ("ShouldStopHere callback didn't find a step out plan from: 0x%" PRIx64 ".", current_addr);
}
}
- return return_plan;
+ return return_plan_sp;
}
else
- return NULL;
+ return ThreadPlanSP();
}
OpenPOWER on IntegriCloud