[Lldb-commits] [lldb] r118036 - /lldb/trunk/source/Commands/CommandObjectCommands.cpp

Caroline Tice ctice at apple.com
Tue Nov 2 12:00:04 PDT 2010


Author: ctice
Date: Tue Nov  2 14:00:04 2010
New Revision: 118036

URL: http://llvm.org/viewvc/llvm-project?rev=118036&view=rev
Log:
Fix error message when attempting to generate invalid alias.


Modified:
    lldb/trunk/source/Commands/CommandObjectCommands.cpp

Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=118036&r1=118035&r2=118036&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Tue Nov  2 14:00:04 2010
@@ -298,8 +298,9 @@
                          }
                          else
                          {
-                             result.AppendErrorWithFormat ("Error occurred while attempting to look up command '%s %s'.\n",
-                                                          alias_command.c_str(), sub_command.c_str());
+                             result.AppendErrorWithFormat("'%s' is not a valid sub-command of '%s'.  "
+                                                          "Unable to create alias.\n",
+                                                          sub_command.c_str(), actual_command.c_str());
                              result.SetStatus (eReturnStatusFailed);
                              return false;
                          }
@@ -310,18 +311,6 @@
 
                  if (args.GetArgumentCount () > 0)
                  {
-                     //if ((!use_subcommand && (cmd_obj->WantsRawCommandString()))
-                     //    || (use_subcommand && (sub_cmd_obj->WantsRawCommandString())))
-                     //{
-                     //    result.AppendErrorWithFormat ("'%s' cannot be aliased with any options or arguments.\n",
-                     //                                 (use_subcommand ? sub_cmd_obj->GetCommandName()
-                     //                                                 : cmd_obj->GetCommandName()));
-                     //    result.SetStatus (eReturnStatusFailed);
-                     //    return false;
-                     //}
-
-                     // options or arguments have been passed to the alias command, and must be 
-                     // verified & processed here.
                      if ((!use_subcommand && (cmd_obj->GetOptions() != NULL))
                          || (use_subcommand && (sub_cmd_obj->GetOptions() != NULL)))
                      {





More information about the lldb-commits mailing list