diff options
Diffstat (limited to 'lldb/source/API/SBThread.cpp')
-rw-r--r-- | lldb/source/API/SBThread.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp index 42b5c9affe5..c26beef1e5e 100644 --- a/lldb/source/API/SBThread.cpp +++ b/lldb/source/API/SBThread.cpp @@ -826,7 +826,6 @@ SBThread::StepOut () Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); - if (log) log->Printf ("SBThread(%p)::StepOut ()", static_cast<void*>(exe_ctx.GetThreadPtr())); @@ -861,6 +860,14 @@ SBThread::StepOutOfFrame (lldb::SBFrame &sb_frame) Mutex::Locker api_locker; ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker); + if (!sb_frame.IsValid()) + { + if (log) + log->Printf("SBThread(%p)::StepOutOfFrame passed an invalid frame, returning.", + static_cast<void*>(exe_ctx.GetThreadPtr())); + return; + } + StackFrameSP frame_sp (sb_frame.GetFrameSP()); if (log) { @@ -877,6 +884,13 @@ SBThread::StepOutOfFrame (lldb::SBFrame &sb_frame) bool abort_other_plans = false; bool stop_other_threads = false; Thread *thread = exe_ctx.GetThreadPtr(); + if (sb_frame.GetThread().GetThreadID() != thread->GetID()) + { + log->Printf("SBThread(%p)::StepOutOfFrame passed a frame from another thread (0x" PRIx64 " vrs. 0x" PRIx64 ", returning.", + static_cast<void*>(exe_ctx.GetThreadPtr()), + sb_frame.GetThread().GetThreadID(), + thread->GetID()); + } ThreadPlanSP new_plan_sp(thread->QueueThreadPlanForStepOut (abort_other_plans, NULL, |