[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-15 Thread Med Ismail Bennani via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. mib marked an inline comment as done. Closed by commit rG4e9e0488ab67: [lldb/Commands] Add ability to run shell command on the host.

[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-15 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. LGTM Comment at: lldb/source/Commands/CommandObjectPlatform.cpp:1590 +void OptionParsingStarting(ExecutionContext *execution_context) override { + m_use_host_platform = false; +}

[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-15 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 264270. mib marked 2 inline comments as done. mib added a comment. Merged the `shell` and `platform shell` test as @JDevlieghere suggested it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79659/new/

[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-11 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib marked an inline comment as done. mib added inline comments. Comment at: lldb/source/Commands/CommandObjectPlatform.cpp:1625 +// When called from the `shell` alias with no argument, exit. +if (args.GetRawPart().empty()) JDevlieghere wrote: > Is

[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Commands/CommandObjectPlatform.cpp:1625 +// When called from the `shell` alias with no argument, exit. +if (args.GetRawPart().empty()) Is this only true for the alias?

[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-09 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 263005. mib edited the summary of this revision. mib added a comment. It looks like command options are not supported on aliases that already have options: (lldb) shell -t 1 -- sleep 5 zsh:1: command not found: -t error: command returned with status 127

[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-09 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 262999. mib added a comment. With the first implementation, I thought it'd be a good idea to have separate Command Objects for `platform shell` and `shell` because I was imagining the latter could be more "powerful": `shell` could have an interactive mode like

[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-08 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. We certainly shouldn't duplicate the code for CommandObjectPlatformShell. Why don't you just add a "m_use_host_platform" ivar to CommandObjectPlatformShell, and make two instances of CommandObjectPlatformShell, one with m_use_host_platform set to false and added as a

[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-08 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. I do something similar with CommandObjectThreadStepWithTypeAndScope so that I can share most of that command code, if you want to see an example of doing that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79659/new/

[Lldb-commits] [PATCH] D79659: [lldb/Commands] Add ability to run shell command on the host.

2020-05-08 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: JDevlieghere, teemperor. Herald added subscribers: lldb-commits, mgorny. Herald added a project: LLDB. This patch introduces the `shell` command in lldb. It allows the user to run shell builtins and binaries on the host without putting lldb in the