Skip to content

Commit 38f04f0

Browse files
authored
Merge pull request #1094 from jimingham/check-step-out-from-here
Verify that the ShouldStopHere callback actually can produce a step o…
2 parents c1dd3a0 + 5f8d7b2 commit 38f04f0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lldb/source/Target/ThreadPlanStepOut.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,14 @@ bool ThreadPlanStepOut::ShouldStop(Event *event_ptr) {
407407
} else {
408408
m_step_out_further_plan_sp =
409409
QueueStepOutFromHerePlan(m_flags, eFrameCompareOlder, m_status);
410+
// I have a few reports of getting here and not being able to
411+
// actually generate a step out from here plan. That shouldn't happen
412+
// because the ShouldStopHere callback shouldn't return true if it
413+
// can't make a step out plan. So far I don't know how that can
414+
// happen, but it's better to just stop here than to crash.
415+
if (!m_step_out_further_plan_sp)
416+
return true;
417+
410418
if (m_step_out_further_plan_sp->GetKind() == eKindStepOut)
411419
{
412420
// If we are planning to step out further, then the frame we are going

0 commit comments

Comments
 (0)