[Lldb-commits] [PATCH] D86667: [lldb/Target] Add custom interpreter option to `platform shell`

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 28 06:38:56 PDT 2020


mib marked 3 inline comments as done.
mib added inline comments.


================
Comment at: lldb/include/lldb/Target/Platform.h:643
+          *command_output, // Pass nullptr if you don't want the command output
+      const Timeout<std::micro> &timeout, bool run_in_shell = true);
 
----------------
labath wrote:
> The run_in_shell argument makes the inferface weird (why do I need to specify a shell, if I don't want to use it). And still suffers from the virtual default argument problem described above. Let's not propagate this Host weirdness into the platform class.
I started by removing this argument, then I noticed that some code calls `Host::RunShellCommand` with the `run_in_shell` argument set to false (i.e. `PlatformDarwin::GetXcodeSelectPath`). This means that `Host::RunShellCommand` will run the command without prepending the "sh -c" part.

That's why I kept it, and renamed it to `run_in_shell` instead of `run_in_default_shell`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86667



More information about the lldb-commits mailing list