diff options
author | Caroline Tice <ctice@apple.com> | 2010-10-18 19:18:31 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2010-10-18 19:18:31 +0000 |
commit | 38c22f56920e9c3d5062cf1fdd29244c6efc02c4 (patch) | |
tree | 656379791842781a18e5e7e624547db2b80b0f2f /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 218f3206fa3d1b275012220eab7b40248b789908 (diff) | |
download | bcm5719-llvm-38c22f56920e9c3d5062cf1fdd29244c6efc02c4.tar.gz bcm5719-llvm-38c22f56920e9c3d5062cf1fdd29244c6efc02c4.zip |
Fix bug where aliases for commands that take raw input were not
executing properly.
llvm-svn: 116735
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 0f5d85b8e76..bb2adeb061a 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -542,11 +542,22 @@ CommandInterpreter::HandleCommand if (command_obj != NULL) { + std::string aliased_cmd_str; if (command_obj->IsAlias()) { BuildAliasCommandArgs (command_obj, command_cstr, command_args, result); if (!result.Succeeded()) return false; + else + { + // We need to transfer the newly constructed args back into the command_line, in case + // this happens to be an alias for a command that takes raw input. + if (command_args.GetCommandString (aliased_cmd_str)) + { + command_line = aliased_cmd_str.c_str(); + command_cstr = command_obj->GetCommandName(); + } + } } if (add_to_history) |