[Lldb-commits] [PATCH] D73303: [lldb/Target] Add Assert StackFrame Recognizer

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 28 08:15:59 PST 2020


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

LGTM with one inline comment, but let's give the other reviewers a chance to take another look before landing this.



================
Comment at: lldb/source/Target/AssertFrameRecognizer.cpp:155
+
+      most_relevant_frame_sp = thread_sp->GetStackFrameAtIndex(
+          std::min(frame_index + 1, last_frame_index));
----------------
Why not return here? 

```
StackFrameSP most_relevant_frame_sp = thread_sp->GetStackFrameAtIndex(std::min(frame_index + 1, last_frame_index));
return lldb::RecognizedStackFrameSP(new AssertRecognizedStackFrame(most_relevant_frame_sp));
```

That way you don't have to check again after you finish the loop and you can just `return RecognizedStackFrameSP();`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73303/new/

https://reviews.llvm.org/D73303





More information about the lldb-commits mailing list