Add an assertion for frame[0] being valid in CommandObjectThread.cpp.

Summary:
This should always be true but sometimes is not, during platform bring
up. As recommended by Jim Ingham, an assertion should be enough here to
help.
This addresses post commit comments in http://reviews.llvm.org/D8554.

Test Plan: Run unit tests.

Reviewers: jasonmolenda, emaste, jingham, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8574

llvm-svn: 233298
This commit is contained in:
Stephane Sezer 2015-03-26 17:47:34 +00:00
parent 017d10bb76
commit ca05ae2bff
1 changed files with 2 additions and 1 deletions

View File

@ -580,8 +580,9 @@ protected:
if (m_step_type == eStepTypeInto)
{
StackFrame *frame = thread->GetStackFrameAtIndex(0).get();
assert(frame != nullptr);
if (frame && frame->HasDebugInformation ())
if (frame->HasDebugInformation ())
{
new_plan_sp = thread->QueueThreadPlanForStepInRange (abort_other_plans,
frame->GetSymbolContext(eSymbolContextEverything).line_entry.range,