From ca05ae2bfffa5662866514ccda47d25d7a09ad60 Mon Sep 17 00:00:00 2001 From: Stephane Sezer Date: Thu, 26 Mar 2015 17:47:34 +0000 Subject: 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 --- lldb/source/Commands/CommandObjectThread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/source/Commands') 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, -- cgit v1.2.3