[Lldb-commits] [PATCH] D47838: [lldb-mi] Re-implement MI -exec-step command.

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 6 21:10:01 PDT 2018


aprantl added a comment.

Did the old implementation come with a testcase? Perhaps I'm misunderstanding the question, but it would probably be best to preserve the old behavior.



================
Comment at: tools/lldb-mi/MICmdCmdExec.cpp:515
+  lldb::SBError error;
+  if (nThreadId != UINT64_MAX) {
+    lldb::SBThread sbThread = rSessionInfo.GetProcess().GetThreadByID(nThreadId);
----------------
Usually we prefer early exits in LLVM code (https://www.llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code)

```
if (!sbThread.IsValid)
  return failure;
sbThread.StepInto();
```
  


https://reviews.llvm.org/D47838





More information about the lldb-commits mailing list