diff options
author | Stephane Sezer <sas@cd80.net> | 2015-03-26 17:47:34 +0000 |
---|---|---|
committer | Stephane Sezer <sas@cd80.net> | 2015-03-26 17:47:34 +0000 |
commit | ca05ae2bfffa5662866514ccda47d25d7a09ad60 (patch) | |
tree | 615ea114da8b945f6c89c399539a26ec54f3f5fd /lldb/source/Commands | |
parent | 017d10bb76947ab4502971f5da14847dbfe1baef (diff) | |
download | bcm5719-llvm-ca05ae2bfffa5662866514ccda47d25d7a09ad60.tar.gz bcm5719-llvm-ca05ae2bfffa5662866514ccda47d25d7a09ad60.zip |
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
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r-- | lldb/source/Commands/CommandObjectThread.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index c55ff5cc8cc..307f2d38179 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -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, |