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

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 7 12:07:58 PDT 2021


JDevlieghere added inline comments.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:2795
                  Locker::FreeAcquiredLock |
-                     (init_session ? Locker::TearDownSession : 0));
+                     (init_session ? Locker::TearDownSession : 0),
+                 io_redirect.GetInputFile(), io_redirect.GetOutputFile(),
----------------
shafik wrote:
> Not sure how I feel about using `0` as kind of a noop for an enum rather then explicitly name it as such. 
FWIW this is all copied from other uses of the locker. 


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:2799
 
-  auto ExtendSysPath = [this](std::string directory) -> llvm::Error {
+  auto ExtendSysPath = [&](std::string directory) -> llvm::Error {
     if (directory.empty()) {
----------------
shafik wrote:
> `&directory` so we are explicit about what we are capturing.
I can't find it in the LLVM coding standards, but I believe it's common in LLVM to capture everything, or at least I've gotten that feedback in past code reviews. 


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

https://reviews.llvm.org/D105327



More information about the lldb-commits mailing list