Skip to content

Commit

Permalink
Add an assertion for frame[0] being valid in CommandObjectThread.cpp.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sas committed Mar 26, 2015
1 parent 017d10b commit ca05ae2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lldb/source/Commands/CommandObjectThread.cpp
Expand Up @@ -580,8 +580,9 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed
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,
Expand Down

0 comments on commit ca05ae2

Please sign in to comment.