[Lldb-commits] [PATCH] D105327: [lldb] Add the ability to silently import scripted commands

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 7 03:50:10 PDT 2021


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

LGTM, thanks!



================
Comment at: lldb/include/lldb/Interpreter/ScriptInterpreter.h:512
   virtual bool
-  LoadScriptingModule(const char *filename, bool init_session,
+  LoadScriptingModule(const char *filename, bool init_session, bool silent,
                       lldb_private::Status &error,
----------------
I think this case where we have two bools next to each other is a good place to actually use the bugprone-arg-comment's `/*silent=*/` comments to have a way to actually check that those don't get mixed up. (Or we could make it a dedicated `enum` which I know you're a big fan of)


================
Comment at: lldb/source/Commands/Options.td:749
+  def silent : Option<"silent", "s">, Group<1>,
+    Desc<"If true don't print output while importing.">;
 }
----------------
`don't print any script output` because we would still print LLDB errors and what not.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:1212
+    return Status(io_redirect_or_error.takeError());
+  }
+
----------------
no curly braces around if


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

https://reviews.llvm.org/D105327



More information about the lldb-commits mailing list