[Lldb-commits] [PATCH] D47991: Improve SBThread's stepping API using SBError parameter.

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 12 09:09:00 PDT 2018


aprantl added a comment.

Hmm.. @lemo 's reasoning



================
Comment at: scripts/interface/SBThread.i:257
+    %feature("autodoc",
+    "Do a instruction level single step in the currently selected thread.
+    ") StepInstruction;
----------------
a -> an


================
Comment at: source/API/SBThread.cpp:703
 
   if (exe_ctx.HasThreadScope()) {
     bool abort_other_plans = false;
----------------
Please always prefer early exits (https://www.llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code)

```
if (!exe_ctx.HasThreadScope())
  return error.SetErrorString("SBThread object is invalid");
```


================
Comment at: source/API/SBThread.cpp:752
 
   if (exe_ctx.HasThreadScope()) {
     bool abort_other_plans = false;
----------------
same here


================
Comment at: source/API/SBThread.cpp:1148
   bool result = false;
   if (exe_ctx.HasThreadScope()) {
     Process::StopLocker stop_locker;
----------------
and here.


https://reviews.llvm.org/D47991





More information about the lldb-commits mailing list