[Lldb-commits] [lldb] r110585 - in /lldb/trunk/source: Commands/CommandObjectCommands.cpp Interpreter/CommandInterpreter.cpp

Sean Callanan scallanan at apple.com
Mon Aug 9 11:50:15 PDT 2010


Author: spyffe
Date: Mon Aug  9 13:50:15 2010
New Revision: 110585

URL: http://llvm.org/viewvc/llvm-project?rev=110585&view=rev
Log:
Updated help text to refer to "commands alias"
instead of "alias."  Also fixed a bunch of
indentation in the help for "commands alias."

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

Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=110585&r1=110584&r2=110585&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Mon Aug  9 13:50:15 2010
@@ -140,27 +140,27 @@
     CommandObjectCommandsAlias () :
         CommandObject ("commands alias",
                          "Allows users to define their own debugger command abbreviations.",
-                         "alias <new_command> <old_command> [<options-for-aliased-command>]")
+                         "commands alias <new_command> <old_command> [<options-for-aliased-command>]")
     {
         SetHelpLong(
     "'alias' allows the user to create a short-cut or abbreviation for long \n\
     commands, multi-word commands, and commands that take particular options. \n\
     Below are some simple examples of how one might use the 'alias' command: \n\
-    \n  'command alias sc script'       // Creates the abbreviation 'sc' for the 'script' \n\
-                              // command. \n\
-      'command alias bp breakpoint'   // Creates the abbreviation 'bp' for the 'breakpoint' \n\
-                              // command.  Since breakpoint commands are two-word \n\
-                              // commands, the user will still need to enter the \n\
-                              // second word after 'bp', e.g. 'bp enable' or \n\
-                              // 'bp delete'. \n\
-      'command alias bpi breakpoint list'   // Creates the abbreviation 'bpi' for the \n\
-                                    // two-word command 'breakpoint list'. \n\
+    \n    'command alias sc script'           // Creates the abbreviation 'sc' for the 'script' \n\
+                                        // command. \n\
+    'command alias bp breakpoint'       // Creates the abbreviation 'bp' for the 'breakpoint' \n\
+                                        // command.  Since breakpoint commands are two-word \n\
+                                        // commands, the user will still need to enter the \n\
+                                        // second word after 'bp', e.g. 'bp enable' or \n\
+                                        // 'bp delete'. \n\
+    'command alias bpi breakpoint list' // Creates the abbreviation 'bpi' for the \n\
+                                        // two-word command 'breakpoint list'. \n\
     \nAn alias can include some options for the command, with the values either \n\
     filled in at the time the alias is created, or specified as positional \n\
     arguments, to be filled in when the alias is invoked.  The following example \n\
     shows how to create aliases with options: \n\
     \n\
-        'command alias bfl breakpoint set -f %1 -l %2' \n\
+    'command alias bfl breakpoint set -f %1 -l %2' \n\
     \nThis creates the abbreviation 'bfl' (for break-file-line), with the -f and -l \n\
     options already part of the alias.  So if the user wants to set a breakpoint \n\
     by file and line without explicitly having to use the -f and -l options, the \n\
@@ -175,20 +175,20 @@
     filled in with the first argument following 'bfl' and the actual line number \n\
     value will be filled in with the second argument.  The user would use this \n\
     alias as follows: \n\
-    \n   (dbg)  alias bfl breakpoint set -f %1 -l %2 \n\
-       <... some time later ...> \n\
-       (dbg)  bfl my-file.c 137 \n\
+    \n    (dbg)  commands alias bfl breakpoint set -f %1 -l %2 \n\
+    <... some time later ...> \n\
+    (dbg)  bfl my-file.c 137 \n\
     \nThis would be the same as if the user had entered \n\
     'breakpoint set -f my-file.c -l 137'. \n\
     \nAnother example: \n\
-    \n    (dbg)  alias pltty  process launch -s -o %1 -e %1 \n\
-        (dbg)  pltty /dev/tty0 \n\
-        // becomes 'process launch -s -o /dev/tty0 -e /dev/tty0' \n\
+    \n    (dbg)  commands alias pltty  process launch -s -o %1 -e %1 \n\
+    (dbg)  pltty /dev/tty0 \n\
+           // becomes 'process launch -s -o /dev/tty0 -e /dev/tty0' \n\
     \nIf the user always wanted to pass the same value to a particular option, the \n\
     alias could be defined with that value directly in the alias as a constant, \n\
     rather than using a positional placeholder: \n\
-    \n     alias bl3  breakpoint set -f %1 -l 3  // Always sets a breakpoint on line \n\
-                                               // 3 of whatever file is indicated. \n");
+    \n    commands alias bl3  breakpoint set -f %1 -l 3  // Always sets a breakpoint on line \n\
+                                                   // 3 of whatever file is indicated. \n");
 
     }
 

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=110585&r1=110584&r2=110585&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Aug  9 13:50:15 2010
@@ -533,7 +533,7 @@
 
     if (m_alias_dict.size() > 0)
     {
-        result.AppendMessage("The following is a list of your current command abbreviations (see 'alias' for more info):");
+        result.AppendMessage("The following is a list of your current command abbreviations (see 'commands alias' for more info):");
         result.AppendMessage("");
         longest_word = FindLongestCommandWord (m_alias_dict);
         max_len = strlen (longest_word.c_str());





More information about the lldb-commits mailing list