summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-02-19 23:22:45 +0000
committerJim Ingham <jingham@apple.com>2013-02-19 23:22:45 +0000
commit11b0e054901348a02af8bd303db22e81aa1709d5 (patch)
tree757d4b93c7c218599db998813d9d0469d8842251
parent2139795dfab1ca0a98b6097dfc78b0a86f4600d8 (diff)
downloadbcm5719-llvm-11b0e054901348a02af8bd303db22e81aa1709d5.tar.gz
bcm5719-llvm-11b0e054901348a02af8bd303db22e81aa1709d5.zip
If RunThreadPlan is called on a thread that doesn't have a selected frame, select frame 0.
<rdar://problem/13093321> llvm-svn: 175573
-rw-r--r--lldb/source/Target/Process.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 036da889a1f..8b83ee679a6 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -4469,7 +4469,19 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
// Save the thread & frame from the exe_ctx for restoration after we run
const uint32_t thread_idx_id = thread->GetIndexID();
- StackID ctx_frame_id = thread->GetSelectedFrame()->GetStackID();
+ StackFrameSP selected_frame_sp = thread->GetSelectedFrame();
+ if (!selected_frame_sp)
+ {
+ thread->SetSelectedFrame(0);
+ selected_frame_sp = thread->GetSelectedFrame();
+ if (!selected_frame_sp)
+ {
+ errors.Printf("RunThreadPlan called without a selected frame on thread %d", thread_idx_id);
+ return eExecutionSetupError;
+ }
+ }
+
+ StackID ctx_frame_id = selected_frame_sp->GetStackID();
// N.B. Running the target may unset the currently selected thread and frame. We don't want to do that either,
// so we should arrange to reset them as well.
OpenPOWER on IntegriCloud