[Lldb-commits] [lldb] r116735 - /lldb/trunk/source/Interpreter/CommandInterpreter.cpp
Caroline Tice
ctice at apple.com
Mon Oct 18 12:18:32 PDT 2010
Author: ctice
Date: Mon Oct 18 14:18:31 2010
New Revision: 116735
URL: http://llvm.org/viewvc/llvm-project?rev=116735&view=rev
Log:
Fix bug where aliases for commands that take raw input were not
executing properly.
Modified:
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=116735&r1=116734&r2=116735&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Oct 18 14:18:31 2010
@@ -542,11 +542,22 @@
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)
More information about the lldb-commits
mailing list