[Lldb-commits] [PATCH] Use eFlagRequiresFrame instead of manually checking in CommandObjectThread.cpp.
Stephane Sezer
sas at cd80.net
Mon Mar 23 19:27:24 PDT 2015
Hi jasonmolenda, emaste, jingham, clayborg,
As recommended by Jason Molenda, we should have eFlagRequiresFrame
instead of manually checking the result of GetStackFrameAtIndex(0). This
addresses post commit comments in http://reviews.llvm.org/D8554.
http://reviews.llvm.org/D8574
Files:
source/Commands/CommandObjectThread.cpp
Index: source/Commands/CommandObjectThread.cpp
===================================================================
--- source/Commands/CommandObjectThread.cpp
+++ source/Commands/CommandObjectThread.cpp
@@ -466,6 +466,7 @@
StepType step_type,
StepScope step_scope) :
CommandObjectParsed (interpreter, name, help, syntax,
+ eFlagRequiresFrame |
eFlagRequiresProcess |
eFlagRequiresThread |
eFlagTryTargetAPILock |
@@ -579,9 +580,10 @@
if (m_step_type == eStepTypeInto)
{
+ // No need to check "frame" for validity as eFlagRequiresFrame guarantees that.
StackFrame *frame = thread->GetStackFrameAtIndex(0).get();
- if (frame && frame->HasDebugInformation ())
+ if (frame->HasDebugInformation ())
{
new_plan_sp = thread->QueueThreadPlanForStepInRange (abort_other_plans,
frame->GetSymbolContext(eSymbolContextEverything).line_entry.range,
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8574.22537.patch
Type: text/x-patch
Size: 1253 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150324/4215043e/attachment.bin>
More information about the lldb-commits
mailing list