summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBThread.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-08-05 22:06:12 +0000
committerJim Ingham <jingham@apple.com>2016-08-05 22:06:12 +0000
commitc915a7d2e810251e28758803d5e72a8178e7b917 (patch)
tree42ba335d2e8fa3cb03b8a8146c052df3406758f7 /lldb/source/API/SBThread.cpp
parent272cbacc25beec921298db499ec12a11ac584fcb (diff)
downloadbcm5719-llvm-c915a7d2e810251e28758803d5e72a8178e7b917.tar.gz
bcm5719-llvm-c915a7d2e810251e28758803d5e72a8178e7b917.zip
Add a few more needed bits to the scripted thread plans.
llvm-svn: 277879
Diffstat (limited to 'lldb/source/API/SBThread.cpp')
-rw-r--r--lldb/source/API/SBThread.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index 47cf80ef29c..8318f041b60 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -1161,6 +1161,12 @@ SBThread::StepOverUntil (lldb::SBFrame &sb_frame,
SBError
SBThread::StepUsingScriptedThreadPlan (const char *script_class_name)
{
+ StepUsingScriptedThreadPlan(script_class_name, true);
+}
+
+SBError
+SBThread::StepUsingScriptedThreadPlan (const char *script_class_name, bool resume_immediately)
+{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBError sb_error;
@@ -1184,15 +1190,26 @@ SBThread::StepUsingScriptedThreadPlan (const char *script_class_name)
Thread *thread = exe_ctx.GetThreadPtr();
ThreadPlanSP thread_plan_sp = thread->QueueThreadPlanForStepScripted(false, script_class_name, false);
+ if (!thread_plan_sp)
+ {
+ sb_error.SetErrorStringWithFormat("Error queueing thread plan for class: %s", script_class_name);
+ return sb_error;
+ }
+
+ if (!resume_immediately)
+ {
+ return sb_error;
+ }
+
if (thread_plan_sp)
sb_error = ResumeNewPlan(exe_ctx, thread_plan_sp.get());
else
{
- sb_error.SetErrorStringWithFormat("Error queuing thread plan for class: %s.", script_class_name);
+ sb_error.SetErrorStringWithFormat("Error resuming thread plan for class: %s.", script_class_name);
if (log)
- log->Printf ("SBThread(%p)::StepUsingScriptedThreadPlan: Error queuing thread plan for class: %s",
- static_cast<void*>(exe_ctx.GetThreadPtr()),
- script_class_name);
+ log->Printf ("SBThread(%p)::StepUsingScriptedThreadPlan: Error queuing thread plan for class: %s",
+ static_cast<void*>(exe_ctx.GetThreadPtr()),
+ script_class_name);
}
return sb_error;
OpenPOWER on IntegriCloud