aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2021-02-11 20:20:04 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2021-02-11 20:23:53 -0800
commit4d3a061c32ee5c4fb88be389a4dd7fd71fc9fa9c (patch)
tree59054c4018e57b7855bab9f0e1d4ca96264fe30d /lldb/source/Interpreter/CommandInterpreter.cpp
parentdb00953ff32aa3c64200871ae4bcd15a776acca0 (diff)
downloadllvm-4d3a061c32ee5c4fb88be389a4dd7fd71fc9fa9c.zip
llvm-4d3a061c32ee5c4fb88be389a4dd7fd71fc9fa9c.tar.gz
llvm-4d3a061c32ee5c4fb88be389a4dd7fd71fc9fa9c.tar.bz2
[lldb] Fix 'r' and 'run' aliases on Apple Silicon
The 'r' and 'run' aliases were different based on the target architecture. I suspect the intention was to disable shell expansion on embedded devices. This fixes TestCustomShell.test on AS.
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index a7afa10..f0a6baa 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -417,17 +417,14 @@ void CommandInterpreter::Initialize() {
cmd_obj_sp = GetCommandSPExact("process launch");
if (cmd_obj_sp) {
alias_arguments_vector_sp = std::make_shared<OptionArgVector>();
-#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
+#if defined(__APPLE__)
+#if defined(TARGET_OS_IPHONE)
AddAlias("r", cmd_obj_sp, "--");
AddAlias("run", cmd_obj_sp, "--");
#else
-#if defined(__APPLE__)
- std::string shell_option;
- shell_option.append("--shell-expand-args");
- shell_option.append(" true");
- shell_option.append(" --");
AddAlias("r", cmd_obj_sp, "--shell-expand-args true --");
AddAlias("run", cmd_obj_sp, "--shell-expand-args true --");
+#endif
#else
StreamString defaultshell;
defaultshell.Printf("--shell=%s --",
@@ -435,7 +432,6 @@ void CommandInterpreter::Initialize() {
AddAlias("r", cmd_obj_sp, defaultshell.GetString());
AddAlias("run", cmd_obj_sp, defaultshell.GetString());
#endif
-#endif
}
cmd_obj_sp = GetCommandSPExact("target symbols add");