[Lldb-commits] [lldb] r115570 - in /lldb/trunk: include/lldb/ include/lldb/Interpreter/ source/Commands/ source/Interpreter/

Caroline Tice ctice at apple.com
Mon Oct 4 15:28:36 PDT 2010


Author: ctice
Date: Mon Oct  4 17:28:36 2010
New Revision: 115570

URL: http://llvm.org/viewvc/llvm-project?rev=115570&view=rev
Log:
Modify existing commands with arguments to use the new argument mechanism
(for standardized argument names, argument help, etc.)


Modified:
    lldb/trunk/include/lldb/Interpreter/CommandObject.h
    lldb/trunk/include/lldb/lldb-enumerations.h
    lldb/trunk/source/Commands/CommandObjectApropos.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
    lldb/trunk/source/Commands/CommandObjectCall.cpp
    lldb/trunk/source/Commands/CommandObjectCommands.cpp
    lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
    lldb/trunk/source/Commands/CommandObjectExpression.cpp
    lldb/trunk/source/Commands/CommandObjectFile.cpp
    lldb/trunk/source/Commands/CommandObjectFrame.cpp
    lldb/trunk/source/Commands/CommandObjectHelp.cpp
    lldb/trunk/source/Commands/CommandObjectImage.cpp
    lldb/trunk/source/Commands/CommandObjectLog.cpp
    lldb/trunk/source/Commands/CommandObjectMemory.cpp
    lldb/trunk/source/Commands/CommandObjectProcess.cpp
    lldb/trunk/source/Commands/CommandObjectRegister.cpp
    lldb/trunk/source/Commands/CommandObjectSettings.cpp
    lldb/trunk/source/Commands/CommandObjectSource.cpp
    lldb/trunk/source/Commands/CommandObjectSyntax.cpp
    lldb/trunk/source/Commands/CommandObjectTarget.cpp
    lldb/trunk/source/Commands/CommandObjectThread.cpp
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp
    lldb/trunk/source/Interpreter/CommandObject.cpp

Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Mon Oct  4 17:28:36 2010
@@ -134,6 +134,9 @@
     void
     GetFormattedCommandArguments (Stream &str);
     
+    bool
+    IsPairType (lldb::ArgumentRepetitionType arg_repeat_type);
+    
     enum 
     {
         eFlagProcessMustBeLaunched = (1 << 0),

Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Mon Oct  4 17:28:36 2010
@@ -511,38 +511,42 @@
 typedef enum CommandArgumentType
 {
     eArgTypeAddress = 0,
+    eArgTypeAliasName,
+    eArgTypeAliasOptions,
     eArgTypeArchitecture,
     eArgTypeBoolean,
     eArgTypeBreakpointID,
     eArgTypeBreakpointIDRange,
     eArgTypeByteSize,
-    eArgTypeChannel,
+    eArgTypeCommandName,
     eArgTypeCount,
+    eArgTypeEndAddress,
     eArgTypeExpression,
     eArgTypeExprFormat,
     eArgTypeFilename,
     eArgTypeFormat,
-    eArgTypeFrameNum,
+    eArgTypeFrameIndex,
     eArgTypeFullName,
     eArgTypeFunctionName,
     eArgTypeIndex,
     eArgTypeLineNum,
+    eArgTypeLogChannel,
     eArgTypeMethod,
     eArgTypeName,
+    eArgTypeNewPathPrefix,
     eArgTypeNumLines,
     eArgTypeNumberPerLine,
     eArgTypeOffset,
+    eArgTypeOldPathPrefix,
     eArgTypeOneLiner,
-    eArgTypeOther,
     eArgTypePath, 
-    eArgTypePathPrefix,
-    eArgTypePathPrefixPair,
     eArgTypePid,
     eArgTypePlugin,
     eArgTypeProcessName,
     eArgTypeQueueName,
     eArgTypeRegisterName,
     eArgTypeRegularExpression,
+    eArgTypeRunArgs,
     eArgTypeRunMode,
     eArgTypeScriptLang,
     eArgTypeSearchWord,
@@ -558,7 +562,6 @@
     eArgTypeThreadID,
     eArgTypeThreadIndex,
     eArgTypeThreadName,
-    eArgTypeUUID,
     eArgTypeUnixSignalNumber,
     eArgTypeVarName,
     eArgTypeValue,
@@ -569,10 +572,17 @@
 
 typedef enum ArgumentRepetitionType
 {
-    eArgRepeatPlain,    // Exactly one occurrence
-    eArgRepeatOptional, // At most one occurrence, but it's optional
-    eArgRepeatPlus,     // One or more occurrences
-    eArgRepeatStar      // Zero or more occurrences
+    eArgRepeatPlain,     // Exactly one occurrence
+    eArgRepeatOptional,  // At most one occurrence, but it's optional
+    eArgRepeatPlus,      // One or more occurrences
+    eArgRepeatStar,      // Zero or more occurrences
+    eArgRepeatRange,      // Repetition of same argument, from 1 to n
+    eArgRepeatPairPlain, // A pair of arguments that must always go together ([arg-type arg-value]), occurs exactly once
+    eArgRepeatPairOptional, // A pair that occurs at most once (optional)
+    eArgRepeatPairPlus,  // One or more occurrences of a pair
+    eArgRepeatPairStar,  // Zero or more occurrences of a pair
+    eArgRepeatPairRange,  // A pair that repeats from 1 to n
+    eArgRepeatPairRangeOptional,  // A pair that repeats from 1 to n, but is optional
 } ArgumentRepetitionType;
 
 

Modified: lldb/trunk/source/Commands/CommandObjectApropos.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectApropos.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectApropos.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectApropos.cpp Mon Oct  4 17:28:36 2010
@@ -30,8 +30,20 @@
     CommandObject (interpreter,
                    "apropos",
                    "Find a list of debugger commands related to a particular word/subject.",
-                   "apropos <search-word>")
+                   NULL)
 {
+    CommandArgumentEntry arg;
+    CommandArgumentData search_word_arg;
+
+    // Define the first (and only) variant of this arg.
+    search_word_arg.arg_type = eArgTypeSearchWord;
+    search_word_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (search_word_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectApropos::~CommandObjectApropos()

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Mon Oct  4 17:28:36 2010
@@ -692,7 +692,7 @@
 
     // Define the first (and only) variant of this arg.
     bp_id_arg.arg_type = eArgTypeBreakpointID;
-    bp_id_arg.arg_repetition = eArgRepeatStar;
+    bp_id_arg.arg_repetition = eArgRepeatOptional;
 
     // There is only one variant this argument could be; put it into the argument entry.
     arg.push_back (bp_id_arg);
@@ -795,11 +795,11 @@
 
     // Create the first variant for the first (and only) argument for this command.
     bp_id_arg.arg_type = eArgTypeBreakpointID;
-    bp_id_arg.arg_repetition = eArgRepeatStar;
+    bp_id_arg.arg_repetition = eArgRepeatOptional;
 
     // Create the second variant for the first (and only) argument for this command.
     bp_id_range_arg.arg_type = eArgTypeBreakpointIDRange;
-    bp_id_range_arg.arg_repetition = eArgRepeatStar;
+    bp_id_range_arg.arg_repetition = eArgRepeatOptional;
 
     // The first (and only) argument for this command could be either a bp_id or a bp_id_range.
     // Push both variants into the entry for the first argument for this command.
@@ -911,11 +911,11 @@
 
     // Create the first variant for the first (and only) argument for this command.
     bp_id_arg.arg_type = eArgTypeBreakpointID;
-    bp_id_arg.arg_repetition = eArgRepeatStar;
+    bp_id_arg.arg_repetition = eArgRepeatOptional;
 
     // Create the second variant for the first (and only) argument for this command.
     bp_id_range_arg.arg_type = eArgTypeBreakpointIDRange;
-    bp_id_range_arg.arg_repetition = eArgRepeatStar;
+    bp_id_range_arg.arg_repetition = eArgRepeatOptional;
 
     // The first (and only) argument for this command could be either a bp_id or a bp_id_range.
     // Push both variants into the entry for the first argument for this command.
@@ -1025,11 +1025,11 @@
 
     // Create the first variant for the first (and only) argument for this command.
     bp_id_arg.arg_type = eArgTypeBreakpointID;
-    bp_id_arg.arg_repetition = eArgRepeatStar;
+    bp_id_arg.arg_repetition = eArgRepeatOptional;
 
     // Create the second variant for the first (and only) argument for this command.
     bp_id_range_arg.arg_type = eArgTypeBreakpointIDRange;
-    bp_id_range_arg.arg_repetition = eArgRepeatStar;
+    bp_id_range_arg.arg_repetition = eArgRepeatOptional;
 
     // The first (and only) argument for this command could be either a bp_id or a bp_id_range.
     // Push both variants into the entry for the first argument for this command.
@@ -1265,11 +1265,11 @@
 
     // Create the first variant for the first (and only) argument for this command.
     bp_id_arg.arg_type = eArgTypeBreakpointID;
-    bp_id_arg.arg_repetition = eArgRepeatPlus;
+    bp_id_arg.arg_repetition = eArgRepeatPlain;
 
     // Create the second variant for the first (and only) argument for this command.
     bp_id_range_arg.arg_type = eArgTypeBreakpointIDRange;
-    bp_id_range_arg.arg_repetition = eArgRepeatPlus;
+    bp_id_range_arg.arg_repetition = eArgRepeatPlain;
 
     // The first (and only) argument for this command could be either a bp_id or a bp_id_range.
     // Push both variants into the entry for the first argument for this command.

Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Mon Oct  4 17:28:36 2010
@@ -129,7 +129,7 @@
     CommandObject (interpreter,
                    "add",
                    "Add a set of commands to a breakpoint, to be executed whenever the breakpoint is hit.",
-                   "breakpoint command add <cmd-options> <breakpoint-id>")
+                   NULL)
 {
     SetHelpLong (
 "\nGeneral information about entering breakpoint commands \n\
@@ -236,6 +236,20 @@
 You may enter any debugger command, exactly as you would at the \n\
 debugger prompt.  You may enter as many debugger commands as you like, \n\
 but do NOT enter more than one command per line. \n" );
+
+
+    CommandArgumentEntry arg;
+    CommandArgumentData bp_id_arg;
+
+    // Define the first (and only) variant of this arg.
+    bp_id_arg.arg_type = eArgTypeBreakpointID;
+    bp_id_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (bp_id_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectBreakpointCommandAdd::~CommandObjectBreakpointCommandAdd ()
@@ -463,8 +477,20 @@
     CommandObject (interpreter, 
                    "remove",
                    "Remove the set of commands from a breakpoint.",
-                   "breakpoint command remove <breakpoint-id>")
+                   NULL)
 {
+    CommandArgumentEntry arg;
+    CommandArgumentData bp_id_arg;
+
+    // Define the first (and only) variant of this arg.
+    bp_id_arg.arg_type = eArgTypeBreakpointID;
+    bp_id_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (bp_id_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectBreakpointCommandRemove::~CommandObjectBreakpointCommandRemove ()
@@ -549,8 +575,20 @@
     CommandObject (interpreter,
                    "list",
                    "List the script or set of commands to be executed when the breakpoint is hit.",
-                   "breakpoint command list <breakpoint-id>")
+                    NULL)
 {
+    CommandArgumentEntry arg;
+    CommandArgumentData bp_id_arg;
+
+    // Define the first (and only) variant of this arg.
+    bp_id_arg.arg_type = eArgTypeBreakpointID;
+    bp_id_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (bp_id_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectBreakpointCommandList::~CommandObjectBreakpointCommandList ()

Modified: lldb/trunk/source/Commands/CommandObjectCall.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCall.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCall.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCall.cpp Mon Oct  4 17:28:36 2010
@@ -110,9 +110,42 @@
     CommandObject (
             "call",
             "Call a function.",
-            "call <return_type> <function-name> [[<arg1-type> <arg1-value>] ... <argn-type> <argn-value>] [<cmd-options>]",
+            //"call <return_type> <function-name> [[<arg1-type> <arg1-value>] ... <argn-type> <argn-value>] [<cmd-options>]",
+            NULL,
             eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
 {
+    CommandArgumentEntry arg1;
+    CommandArgumentEntry arg2;
+    CommandArgumentEntry arg3;
+    CommandArgumentData return_type_arg;
+    CommandArgumentData function_name_arg;
+    CommandArgumentData arg_type_arg;
+    CommandArgumentData arg_value_arg;
+
+    // Define the first (and only) variant of this arg.
+    return_type_arg.arg_type = eArgTypeType;
+    return_type_arg.arg_repetition = eArgRepeatPlain;
+
+    arg1.push_back (return_type_arg);
+
+    function_name_arg.arg_type = eArgTypeFunctionName;
+    function_name_arg.arg_repetition = eArgTypePlain;
+
+    arg2.push_back (function_name_arg);
+
+    arg_type_arg.arg_type = eArgTypeArgType;
+    arg_type_arg.arg_repetition = eArgRepeatPairRangeOptional;
+
+    arg_value_arg.arg_type = eArgTypeValue;
+    arg_value_arg.arg_repetition = eArgRepeatPairRangeOptional;
+
+    arg3.push_back (arg_type_arg);
+    arg3.push_back (arg_value_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg1);
+    m_arguments.push_back (arg2);
+    m_arguments.push_back (arg3);
 }
 
 CommandObjectCall::~CommandObjectCall ()

Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Mon Oct  4 17:28:36 2010
@@ -35,8 +35,20 @@
         CommandObject (interpreter,
                        "commands source",
                        "Read in debugger commands from the file <filename> and execute them.",
-                       "command source <filename>")
+                       NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData file_arg;
+        
+        // Define the first (and only) variant of this arg.
+        file_arg.arg_type = eArgTypeFilename;
+        file_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (file_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     ~CommandObjectCommandsSource ()
@@ -139,7 +151,7 @@
         CommandObject (interpreter, 
                        "commands alias",
                        "Allow users to define their own debugger command abbreviations.",
-                       "commands alias <new_command> <old_command> [<options-for-aliased-command>]")
+                       NULL)
     {
         SetHelpLong(
     "'alias' allows the user to create a short-cut or abbreviation for long \n\
@@ -189,6 +201,38 @@
     \n    commands alias bl3  breakpoint set -f %1 -l 3  // Always sets a breakpoint on line \n\
                                                    // 3 of whatever file is indicated. \n");
 
+        CommandArgumentEntry arg1;
+        CommandArgumentEntry arg2;
+        CommandArgumentEntry arg3;
+        CommandArgumentData alias_arg;
+        CommandArgumentData cmd_arg;
+        CommandArgumentData options_arg;
+        
+        // Define the first (and only) variant of this arg.
+        alias_arg.arg_type = eArgTypeAliasName;
+        alias_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg1.push_back (alias_arg);
+        
+        // Define the first (and only) variant of this arg.
+        cmd_arg.arg_type = eArgTypeCommandName;
+        cmd_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg2.push_back (cmd_arg);
+        
+        // Define the first (and only) variant of this arg.
+        options_arg.arg_type = eArgTypeAliasOptions;
+        options_arg.arg_repetition = eArgRepeatOptional;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg3.push_back (options_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg1);
+        m_arguments.push_back (arg2);
+        m_arguments.push_back (arg3);
     }
 
     ~CommandObjectCommandsAlias ()
@@ -352,8 +396,20 @@
         CommandObject (interpreter,
                        "commands unalias",
                        "Allow the user to remove/delete a user-defined command abbreviation.",
-                       "unalias <alias-name-to-be-removed>")
+                       NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData alias_arg;
+        
+        // Define the first (and only) variant of this arg.
+        alias_arg.arg_type = eArgTypeAliasName;
+        alias_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (alias_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     ~CommandObjectCommandsUnalias()

Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Mon Oct  4 17:28:36 2010
@@ -125,8 +125,8 @@
 { LLDB_OPT_SET_ALL, false, "mixed",    'm', no_argument,       NULL, 0, eArgTypeNone,             "Enable mixed source and assembly display."},
 { LLDB_OPT_SET_ALL, false, "raw",      'r', no_argument,       NULL, 0, eArgTypeNone,             "Print raw disassembly with no symbol information."},
 
-{ LLDB_OPT_SET_1, true, "start-address",  's', required_argument, NULL, 0, eArgTypeAddress,      "Address to start disassembling."},
-{ LLDB_OPT_SET_1, false, "end-address",  'e', required_argument, NULL, 0, eArgTypeAddress,      "Address to start disassembling."},
+{ LLDB_OPT_SET_1, true, "start-address",  's', required_argument, NULL, 0, eArgTypeStartAddress,      "Address at which to start disassembling."},
+{ LLDB_OPT_SET_1, false, "end-address",  'e', required_argument, NULL, 0, eArgTypeEndAddress,      "Address at which to end disassembling."},
 
 { LLDB_OPT_SET_2, true, "name",     'n', required_argument, NULL, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName,             "Disassemble entire contents of the given function name."},
 

Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Mon Oct  4 17:28:36 2010
@@ -106,7 +106,7 @@
     CommandObject (interpreter,
                    "expression",
                    "Evaluate a C/ObjC/C++ expression in the current program context, using variables currently in scope.",
-                   "expression [<cmd-options>] <expr>"),
+                   NULL),
     m_expr_line_count (0),
     m_expr_lines ()
 {
@@ -116,6 +116,19 @@
    expr my_struct->a = my_array[3] \n\
    expr -f bin -- (index * 8) + 5 \n\
    expr char c[] = \"foo\"; c[0]\n");
+
+    CommandArgumentEntry arg;
+    CommandArgumentData expression_arg;
+
+    // Define the first (and only) variant of this arg.
+    expression_arg.arg_type = eArgTypeExpression;
+    expression_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (expression_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectExpression::~CommandObjectExpression ()

Modified: lldb/trunk/source/Commands/CommandObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFile.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFile.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFile.cpp Mon Oct  4 17:28:36 2010
@@ -89,8 +89,20 @@
     CommandObject (interpreter,
                    "file",
                    "Set the file to be used as the main executable by the debugger.",
-                   "file [<cmd-options>] <filename>")
+                   NULL)
 {
+    CommandArgumentEntry arg;
+    CommandArgumentData file_arg;
+
+    // Define the first (and only) variant of this arg.
+    file_arg.arg_type = eArgTypeFilename;
+    file_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (file_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectFile::~CommandObjectFile ()

Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Mon Oct  4 17:28:36 2010
@@ -98,9 +98,21 @@
         CommandObject (interpreter,
                        "frame select",
                        "Select a frame by index from within the current thread and make it the current frame.",
-                       "frame select <frame-index>",
+                       NULL,
                        eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData index_arg;
+
+        // Define the first (and only) variant of this arg.
+        index_arg.arg_type = eArgTypeFrameIndex;
+        index_arg.arg_repetition = eArgRepeatPlain;
+
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (index_arg);
+
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     ~CommandObjectFrameSelect ()
@@ -296,8 +308,20 @@
                        "argument, local, file static and file global variables."
                        "Children of aggregate variables can be specified such as "
                        "'var->child.x'.",
-                       "frame variable [<cmd-options>] [<var-name1> [<var-name2>...]]")
+                       NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData var_name_arg;
+        
+        // Define the first (and only) variant of this arg.
+        var_name_arg.arg_type = eArgTypeVarName;
+        var_name_arg.arg_repetition = eArgRepeatStar;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (var_name_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     virtual

Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Mon Oct  4 17:28:36 2010
@@ -31,6 +31,18 @@
                    "Show a list of all debugger commands, or give details about specific commands.",
                    "help [<cmd-name>]")
 {
+    CommandArgumentEntry arg;
+    CommandArgumentData command_arg;
+
+    // Define the first (and only) variant of this arg.
+    command_arg.arg_type = eArgTypeCommandName;
+    command_arg.arg_repetition = eArgRepeatStar;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (command_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectHelp::~CommandObjectHelp()

Modified: lldb/trunk/source/Commands/CommandObjectImage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectImage.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectImage.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectImage.cpp Mon Oct  4 17:28:36 2010
@@ -482,6 +482,18 @@
                                       const char *syntax) :
         CommandObject (interpreter, name, help, syntax)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData file_arg;
+
+        // Define the first (and only) variant of this arg.
+        file_arg.arg_type = eArgTypeFilename;
+        file_arg.arg_repetition = eArgRepeatStar;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (file_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     virtual
@@ -525,6 +537,18 @@
                                           const char *syntax) :
         CommandObject (interpreter, name, help, syntax)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData source_file_arg;
+        
+        // Define the first (and only) variant of this arg.
+        source_file_arg.arg_type = eArgTypeSourceFile;
+        source_file_arg.arg_repetition = eArgRepeatPlus;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (source_file_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     virtual
@@ -566,7 +590,7 @@
         CommandObjectImageDumpModuleList (interpreter,
                                           "image dump symtab",
                                           "Dump the symbol table from one or more executable images.",
-                                          "image dump symtab [<file1> ...]")
+                                           NULL)
     {
     }
 
@@ -674,7 +698,8 @@
         CommandObjectImageDumpModuleList (interpreter,
                                           "image dump sections",
                                           "Dump the sections from one or more executable images.",
-                                          "image dump sections [<file1> ...]")
+                                          //"image dump sections [<file1> ...]")
+                                          NULL)
     {
     }
 
@@ -781,7 +806,8 @@
         CommandObjectImageDumpModuleList (interpreter,
                                           "image dump symfile",
                                           "Dump the debug symbol file for one or more executable images.",
-                                          "image dump symfile [<file1> ...]")
+                                          //"image dump symfile [<file1> ...]")
+                                          NULL)
     {
     }
 
@@ -888,7 +914,7 @@
         CommandObjectImageDumpSourceFileList (interpreter,
                                               "image dump line-table",
                                               "Dump the debug symbol file for one or more executable images.",
-                                              "image dump line-table <source-file1> [<source-file2> ...]")
+                                              NULL)
     {
     }
 
@@ -1326,8 +1352,20 @@
         CommandObject (interpreter,
                        "image lookup",
                        "Look up information within executable and dependent shared library images.",
-                       "image lookup [<cmd-options>] [<file1>...]")
+                       NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData file_arg;
+        
+        // Define the first (and only) variant of this arg.
+        file_arg.arg_type = eArgTypeFilename;
+        file_arg.arg_repetition = eArgRepeatStar;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (file_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     virtual

Modified: lldb/trunk/source/Commands/CommandObjectLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectLog.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectLog.cpp Mon Oct  4 17:28:36 2010
@@ -62,8 +62,20 @@
         CommandObject (interpreter,
                        "log enable",
                        "Enable logging for a single log channel.",
-                       "log enable [<cmd-options>] <channel>")
+                        NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData channel_arg;
+        
+        // Define the first (and only) variant of this arg.
+        channel_arg.arg_type = eArgTypeLogChannel;
+        channel_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (channel_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     virtual
@@ -238,8 +250,20 @@
         CommandObject (interpreter,
                        "log disable",
                        "Disable one or more log channels.",
-                       "log disable <channel> [<channel> ...]")
+                       NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData channel_arg;
+        
+        // Define the first (and only) variant of this arg.
+        channel_arg.arg_type = eArgTypeLogChannel;
+        channel_arg.arg_repetition = eArgRepeatPlus;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (channel_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     virtual
@@ -298,9 +322,21 @@
     CommandObjectLogList(CommandInterpreter &interpreter) :
         CommandObject (interpreter, 
                        "log list",
-                       "List the log categories for one or more log channels.",
-                       "log list <channel> [<channel> ...]")
+                       "List the log categories for one or more log channels.  If none specified, lists them all.",
+                       NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData channel_arg;
+        
+        // Define the first (and only) variant of this arg.
+        channel_arg.arg_type = eArgTypeLogChannel;
+        channel_arg.arg_repetition = eArgRepeatStar;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (channel_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     virtual

Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Mon Oct  4 17:28:36 2010
@@ -180,9 +180,31 @@
         CommandObject (interpreter,
                        "memory read",
                        "Read from the memory of the process being debugged.",
-                       "memory read [<cmd-options>] <start-addr> [<end-addr>]",
+                       NULL,
                        eFlagProcessMustBeLaunched)
     {
+        CommandArgumentEntry arg1;
+        CommandArgumentEntry arg2;
+        CommandArgumentData start_addr_arg;
+        CommandArgumentData end_addr_arg;
+        
+        // Define the first (and only) variant of this arg.
+        start_addr_arg.arg_type = eArgTypeStartAddress;
+        start_addr_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg1.push_back (start_addr_arg);
+        
+        // Define the first (and only) variant of this arg.
+        end_addr_arg.arg_type = eArgTypeEndAddress;
+        end_addr_arg.arg_repetition = eArgRepeatOptional;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg2.push_back (end_addr_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg1);
+        m_arguments.push_back (arg2);
     }
 
     virtual
@@ -398,9 +420,32 @@
         CommandObject (interpreter,
                        "memory write",
                        "Write to the memory of the process being debugged.",
-                       "memory write [<cmd-options>] <addr> [value1 value2 ...]",
+                       //"memory write [<cmd-options>] <addr> [value1 value2 ...]",
+                       NULL,
                        eFlagProcessMustBeLaunched)
     {
+        CommandArgumentEntry arg1;
+        CommandArgumentEntry arg2;
+        CommandArgumentData addr_arg;
+        CommandArgumentData value_arg;
+        
+        // Define the first (and only) variant of this arg.
+        addr_arg.arg_type = eArgTypeAddress;
+        addr_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg1.push_back (addr_arg);
+        
+        // Define the first (and only) variant of this arg.
+        value_arg.arg_type = eArgTypeValue;
+        value_arg.arg_repetition = eArgRepeatPlus;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg2.push_back (value_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg1);
+        m_arguments.push_back (arg2);
     }
 
     virtual

Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Mon Oct  4 17:28:36 2010
@@ -105,8 +105,20 @@
         CommandObject (interpreter,
                        "process launch",
                        "Launch the executable in the debugger.",
-                       "process launch [<cmd-options>] [<arguments-for-running-the-program>]")
+                       NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData run_args_arg;
+        
+        // Define the first (and only) variant of this arg.
+        run_args_arg.arg_type = eArgTypeRunArgs;
+        run_args_arg.arg_repetition = eArgRepeatOptional;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (run_args_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
 
@@ -797,8 +809,20 @@
         CommandObject (interpreter,
                        "process signal",
                        "Send a UNIX signal to the current process being debugged.",
-                       "process signal <unix-signal-number>")
+                       NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData signal_arg;
+        
+        // Define the first (and only) variant of this arg.
+        signal_arg.arg_type = eArgTypeUnixSignalNumber;
+        signal_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (signal_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     ~CommandObjectProcessSignal ()

Modified: lldb/trunk/source/Commands/CommandObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectRegister.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectRegister.cpp Mon Oct  4 17:28:36 2010
@@ -34,10 +34,23 @@
     CommandObjectRegisterRead (CommandInterpreter &interpreter) :
         CommandObject (interpreter, 
                        "register read",
-                       "Dump the contents of one or more register values from the current frame.",
-                       "register read [<reg-name1> [<reg-name2> [...]]]",
+                       "Dump the contents of one or more register values from the current frame.  If no register is specified, dumps them all.",
+                       //"register read [<reg-name1> [<reg-name2> [...]]]",
+                       NULL,
                        eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData register_arg;
+        
+        // Define the first (and only) variant of this arg.
+        register_arg.arg_type = eArgTypeRegisterName;
+        register_arg.arg_repetition = eArgRepeatStar;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (register_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     virtual
@@ -143,9 +156,32 @@
         CommandObject (interpreter,
                        "register write",
                        "Modify a single register value.",
-                       "register write <reg-name> <value>",
+                       //"register write <reg-name> <value>",
+                       NULL,
                        eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
     {
+        CommandArgumentEntry arg1;
+        CommandArgumentEntry arg2;
+        CommandArgumentData register_arg;
+        CommandArgumentData value_arg;
+        
+        // Define the first (and only) variant of this arg.
+        register_arg.arg_type = eArgTypeRegisterName;
+        register_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg1.push_back (register_arg);
+        
+        // Define the first (and only) variant of this arg.
+        value_arg.arg_type = eArgTypeValue;
+        value_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg2.push_back (value_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg1);
+        m_arguments.push_back (arg2);
     }
 
     virtual

Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Mon Oct  4 17:28:36 2010
@@ -65,9 +65,31 @@
     CommandObject (interpreter,
                    "settings set",
                    "Set or change the value of a single debugger setting variable.",
-                   "settings set [<cmd-options>] <setting-variable-name> <value>"),
+                   NULL),
     m_options ()
 {
+    CommandArgumentEntry arg1;
+    CommandArgumentEntry arg2;
+    CommandArgumentData var_name_arg;
+    CommandArgumentData value_arg;
+
+    // Define the first (and only) variant of this arg.
+    var_name_arg.arg_type = eArgTypeSettingVariableName;
+    var_name_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg1.push_back (var_name_arg);
+
+    // Define the first (and only) variant of this arg.
+    value_arg.arg_type = eArgTypeValue;
+    value_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg2.push_back (value_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg1);
+    m_arguments.push_back (arg2);
 }
 
 CommandObjectSettingsSet::~CommandObjectSettingsSet()
@@ -263,8 +285,20 @@
     CommandObject (interpreter,
                    "settings show",
                    "Show the specified internal debugger setting variable and its value, or show all the currently set variables and their values, if nothing is specified.",
-                   "settings show [<setting-variable-name>]")
+                   NULL)
 {
+    CommandArgumentEntry arg1;
+    CommandArgumentData var_name_arg;
+
+    // Define the first (and only) variant of this arg.
+    var_name_arg.arg_type = eArgTypeSettingVariableName;
+    var_name_arg.arg_repetition = eArgRepeatOptional;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg1.push_back (var_name_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg1);
 }
 
 CommandObjectSettingsShow::~CommandObjectSettingsShow()
@@ -374,8 +408,25 @@
     CommandObject (interpreter, 
                    "settings list",
                    "List and describe all the internal debugger settings variables that are available to the user to 'set' or 'show', or describe a particular variable or set of variables (by specifying the variable name or a common prefix).",
-                   "settings list [<setting-name> | <setting-name-prefix>]")
+                   NULL)
 {
+    CommandArgumentEntry arg;
+    CommandArgumentData var_name_arg;
+    CommandArgumentData prefix_name_arg;
+
+    // Define the first variant of this arg.
+    var_name_arg.arg_type = eArgTypeSettingVariableName;
+    var_name_arg.arg_repetition = eArgRepeatOptional;
+
+    // Define the second variant of this arg.
+    prefix_name_arg.arg_type = eArgTypeSettingPrefix;
+    prefix_name_arg.arg_repetition = eArgRepeatOptional;
+
+    arg.push_back (var_name_arg);
+    arg.push_back (prefix_name_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectSettingsList::~CommandObjectSettingsList()
@@ -462,8 +513,36 @@
     CommandObject (interpreter, 
                    "settings remove",
                    "Remove the specified element from an internal debugger settings array or dictionary variable.",
-                   "settings remove <setting-variable-name> [<index>|\"key\"]")
+                   NULL)
 {
+    CommandArgumentEntry arg1;
+    CommandArgumentEntry arg2;
+    CommandArgumentData var_name_arg;
+    CommandArgumentData index_arg;
+    CommandArgumentData key_arg;
+
+    // Define the first (and only) variant of this arg.
+    var_name_arg.arg_type = eArgTypeSettingVariableName;
+    var_name_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg1.push_back (var_name_arg);
+
+    // Define the first variant of this arg.
+    index_arg.arg_type = eArgTypeSettingIndex;
+    index_arg.arg_repetition = eArgRepeatPlain;
+
+    // Define the second variant of this arg.
+    key_arg.arg_type = eArgTypeSettingKey;
+    key_arg.arg_repetition = eArgRepeatPlain;
+
+    // Push both variants into this arg
+    arg2.push_back (index_arg);
+    arg2.push_back (key_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg1);
+    m_arguments.push_back (arg2);
 }
 
 CommandObjectSettingsRemove::~CommandObjectSettingsRemove ()
@@ -560,8 +639,46 @@
     CommandObject (interpreter,
                    "settings replace",
                    "Replace the specified element from an internal debugger settings array or dictionary variable with the specified new value.",
-                   "settings replace <setting-variable-name> [<index>|\"<key>\"] <new-value>")
+                   NULL)
 {
+    CommandArgumentEntry arg1;
+    CommandArgumentEntry arg2;
+    CommandArgumentEntry arg3;
+    CommandArgumentData var_name_arg;
+    CommandArgumentData index_arg;
+    CommandArgumentData key_arg;
+    CommandArgumentData value_arg;
+
+    // Define the first (and only) variant of this arg.
+    var_name_arg.arg_type = eArgTypeSettingVariableName;
+    var_name_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg1.push_back (var_name_arg);
+
+    // Define the first (variant of this arg.
+    index_arg.arg_type = eArgTypeSettingIndex;
+    index_arg.arg_repetition = eArgRepeatPlain;
+
+    // Define the second (variant of this arg.
+    key_arg.arg_type = eArgTypeSettingKey;
+    key_arg.arg_repetition = eArgRepeatPlain;
+
+    // Put both variants into this arg
+    arg2.push_back (index_arg);
+    arg2.push_back (key_arg);
+
+    // Define the first (and only) variant of this arg.
+    value_arg.arg_type = eArgTypeValue;
+    value_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg3.push_back (value_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg1);
+    m_arguments.push_back (arg2);
+    m_arguments.push_back (arg3);
 }
 
 CommandObjectSettingsReplace::~CommandObjectSettingsReplace ()
@@ -673,8 +790,40 @@
     CommandObject (interpreter,
                    "settings insert-before",
                    "Insert value(s) into an internal debugger settings array variable, immediately before the specified element.",
-                   "settings insert-before <setting-variable-name> [<index>] <new-value>")
+                   NULL)
 {
+    CommandArgumentEntry arg1;
+    CommandArgumentEntry arg2;
+    CommandArgumentEntry arg3;
+    CommandArgumentData var_name_arg;
+    CommandArgumentData index_arg;
+    CommandArgumentData value_arg;
+
+    // Define the first (and only) variant of this arg.
+    var_name_arg.arg_type = eArgTypeSettingVariableName;
+    var_name_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg1.push_back (var_name_arg);
+
+    // Define the first (variant of this arg.
+    index_arg.arg_type = eArgTypeSettingIndex;
+    index_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg2.push_back (index_arg);
+
+    // Define the first (and only) variant of this arg.
+    value_arg.arg_type = eArgTypeValue;
+    value_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg3.push_back (value_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg1);
+    m_arguments.push_back (arg2);
+    m_arguments.push_back (arg3);
 }
 
 CommandObjectSettingsInsertBefore::~CommandObjectSettingsInsertBefore ()
@@ -788,8 +937,40 @@
     CommandObject (interpreter,
                    "settings insert-after",
                    "Insert value(s) into an internal debugger settings array variable, immediately after the specified element.",
-                   "settings insert-after <setting-variable-name> [<index>] <new-value>")
+                   NULL)
 {
+    CommandArgumentEntry arg1;
+    CommandArgumentEntry arg2;
+    CommandArgumentEntry arg3;
+    CommandArgumentData var_name_arg;
+    CommandArgumentData index_arg;
+    CommandArgumentData value_arg;
+
+    // Define the first (and only) variant of this arg.
+    var_name_arg.arg_type = eArgTypeSettingVariableName;
+    var_name_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg1.push_back (var_name_arg);
+
+    // Define the first (variant of this arg.
+    index_arg.arg_type = eArgTypeSettingIndex;
+    index_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg2.push_back (index_arg);
+
+    // Define the first (and only) variant of this arg.
+    value_arg.arg_type = eArgTypeValue;
+    value_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg3.push_back (value_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg1);
+    m_arguments.push_back (arg2);
+    m_arguments.push_back (arg3);
 }
 
 CommandObjectSettingsInsertAfter::~CommandObjectSettingsInsertAfter ()
@@ -903,8 +1084,30 @@
     CommandObject (interpreter,
                    "settings append",
                    "Append a new value to the end of an internal debugger settings array, dictionary or string variable.",
-                   "settings append <setting-variable-name> <new-value>")
+                   NULL)
 {
+    CommandArgumentEntry arg1;
+    CommandArgumentEntry arg2;
+    CommandArgumentData var_name_arg;
+    CommandArgumentData value_arg;
+
+    // Define the first (and only) variant of this arg.
+    var_name_arg.arg_type = eArgTypeSettingVariableName;
+    var_name_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg1.push_back (var_name_arg);
+
+    // Define the first (and only) variant of this arg.
+    value_arg.arg_type = eArgTypeValue;
+    value_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg2.push_back (value_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg1);
+    m_arguments.push_back (arg2);
 }
 
 CommandObjectSettingsAppend::~CommandObjectSettingsAppend ()
@@ -1005,8 +1208,20 @@
     CommandObject (interpreter, 
                    "settings clear",
                    "Erase all the contents of an internal debugger settings variables; this is only valid for variables with clearable types, i.e. strings, arrays or dictionaries.",
-                   "settings clear")
+                   NULL)
 {
+    CommandArgumentEntry arg;
+    CommandArgumentData var_name_arg;
+
+    // Define the first (and only) variant of this arg.
+    var_name_arg.arg_type = eArgTypeSettingVariableName;
+    var_name_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (var_name_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectSettingsClear::~CommandObjectSettingsClear ()

Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Mon Oct  4 17:28:36 2010
@@ -231,8 +231,20 @@
         CommandObject (interpreter,
                        "source list",
                        "Display source code (as specified) based on the current executable's debug info.",
-                       "source list [<cmd-options>] [<filename>]")
+                        NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData file_arg;
+        
+        // Define the first (and only) variant of this arg.
+        file_arg.arg_type = eArgTypeFilename;
+        file_arg.arg_repetition = eArgRepeatOptional;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (file_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     ~CommandObjectSourceList ()

Modified: lldb/trunk/source/Commands/CommandObjectSyntax.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSyntax.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSyntax.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSyntax.cpp Mon Oct  4 17:28:36 2010
@@ -33,6 +33,18 @@
                    "Shows the correct syntax for a given debugger command.",
                    "syntax <command>")
 {
+    CommandArgumentEntry arg;
+    CommandArgumentData command_arg;
+
+    // Define the first (and only) variant of this arg.
+    command_arg.arg_type = eArgTypeCommandName;
+    command_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (command_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectSyntax::~CommandObjectSyntax()

Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Mon Oct  4 17:28:36 2010
@@ -38,8 +38,28 @@
         CommandObject (interpreter,
                        "target image-search-paths add",
                        "Add new image search paths substitution pairs to the current target.",
-                       "target image-search-paths add <path-prefix> <new-path-prefix> [<path-prefix> <new-path-prefix>] ...")
+                       NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData old_prefix_arg;
+        CommandArgumentData new_prefix_arg;
+        
+        // Define the first variant of this arg pair.
+        old_prefix_arg.arg_type = eArgTypeOldPathPrefix;
+        old_prefix_arg.arg_repetition = eArgRepeatPairPlus;
+        
+        // Define the first variant of this arg pair.
+        new_prefix_arg.arg_type = eArgTypeNewPathPrefix;
+        new_prefix_arg.arg_repetition = eArgRepeatPairPlus;
+        
+        // There are two required arguments that must always occur together, i.e. an argument "pair".  Because they
+        // must always occur together, they are treated as two variants of one argument rather than two independent
+        // arguments.  Push them both into the first argument position for m_arguments...
+
+        arg.push_back (old_prefix_arg);
+        arg.push_back (new_prefix_arg);
+
+        m_arguments.push_back (arg);
     }
 
     ~CommandObjectTargetImageSearchPathsAdd ()
@@ -136,8 +156,39 @@
         CommandObject (interpreter,
                        "target image-search-paths insert",
                        "Insert a new image search path substitution pair into the current target at the specified index.",
-                       "target image-search-paths insert <index> <path-prefix> <new-path-prefix> [<path-prefix> <new-path-prefix>] ...")
+                       NULL)
     {
+        CommandArgumentEntry arg1;
+        CommandArgumentEntry arg2;
+        CommandArgumentData index_arg;
+        CommandArgumentData old_prefix_arg;
+        CommandArgumentData new_prefix_arg;
+        
+        // Define the first and only variant of this arg.
+        index_arg.arg_type = eArgTypeIndex;
+        index_arg.arg_repetition = eArgRepeatPlain;
+
+        // Put the one and only variant into the first arg for m_arguments:
+        arg1.push_back (index_arg);
+
+        // Define the first variant of this arg pair.
+        old_prefix_arg.arg_type = eArgTypeOldPathPrefix;
+        old_prefix_arg.arg_repetition = eArgRepeatPairPlus;
+        
+        // Define the first variant of this arg pair.
+        new_prefix_arg.arg_type = eArgTypeNewPathPrefix;
+        new_prefix_arg.arg_repetition = eArgRepeatPairPlus;
+        
+        // There are two required arguments that must always occur together, i.e. an argument "pair".  Because they
+        // must always occur together, they are treated as two variants of one argument rather than two independent
+        // arguments.  Push them both into the same argument position for m_arguments...
+
+        arg2.push_back (old_prefix_arg);
+        arg2.push_back (new_prefix_arg);
+
+        // Add arguments to m_arguments.
+        m_arguments.push_back (arg1);
+        m_arguments.push_back (arg2);
     }
 
     ~CommandObjectTargetImageSearchPathsInsert ()
@@ -260,8 +311,20 @@
     CommandObject (interpreter,
                    "target image-search-paths query",
                    "Transform a path using the first applicable image search path.",
-                   "target image-search-paths query <path>")
+                   NULL)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData path_arg;
+        
+        // Define the first (and only) variant of this arg.
+        path_arg.arg_type = eArgTypePath;
+        path_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (path_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     ~CommandObjectTargetImageSearchPathsQuery ()

Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Mon Oct  4 17:28:36 2010
@@ -322,10 +322,22 @@
         CommandObject (interpreter,
                        "thread backtrace",
                        "Show the stack for one or more threads.  If no threads are specified, show the currently selected thread.  Use the thread-index \"all\" to see all threads.",
-                       "thread backtrace [<thread-index>] ...",
+                       NULL,
                        eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
         m_options()
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData thread_idx_arg;
+        
+        // Define the first (and only) variant of this arg.
+        thread_idx_arg.arg_type = eArgTypeThreadIndex;
+        thread_idx_arg.arg_repetition = eArgRepeatStar;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (thread_idx_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     ~CommandObjectThreadBacktrace()
@@ -456,7 +468,7 @@
 CommandObjectThreadBacktrace::CommandOptions::g_option_table[] =
 {
 { LLDB_OPT_SET_1, false, "count", 'c', required_argument, NULL, 0, eArgTypeCount, "How many frames to display (-1 for all)"},
-{ LLDB_OPT_SET_1, false, "start", 's', required_argument, NULL, 0, eArgTypeFrameNum, "Frame in which to start the backtrace"},
+{ LLDB_OPT_SET_1, false, "start", 's', required_argument, NULL, 0, eArgTypeFrameIndex, "Frame in which to start the backtrace"},
 { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL }
 };
 
@@ -562,6 +574,18 @@
         m_step_scope (step_scope),
         m_options ()
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData thread_id_arg;
+        
+        // Define the first (and only) variant of this arg.
+        thread_id_arg.arg_type = eArgTypeThreadID;
+        thread_id_arg.arg_repetition = eArgRepeatOptional;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (thread_id_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
     virtual
@@ -779,9 +803,21 @@
         CommandObject (interpreter, 
                        "thread continue",
                        "Continue execution of one or more threads in an active process.",
-                       "thread continue <thread-index> [<thread-index> ...]",
+                       NULL,
                        eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData thread_idx_arg;
+        
+        // Define the first (and only) variant of this arg.
+        thread_idx_arg.arg_type = eArgTypeThreadIndex;
+        thread_idx_arg.arg_repetition = eArgRepeatPlus;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (thread_idx_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
 
@@ -1023,10 +1059,22 @@
         CommandObject (interpreter, 
                        "thread until",
                        "Run the current or specified thread until it reaches a given line number or leaves the current function.",
-                       "thread until [<cmd-options>] <line-number>",
+                       NULL,
                        eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
         m_options ()
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData line_num_arg;
+        
+        // Define the first (and only) variant of this arg.
+        line_num_arg.arg_type = eArgTypeLineNum;
+        line_num_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (line_num_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
 
@@ -1203,7 +1251,7 @@
 lldb::OptionDefinition
 CommandObjectThreadUntil::CommandOptions::g_option_table[] =
 {
-{ LLDB_OPT_SET_1, false, "frame",   'f', required_argument, NULL,               0, eArgTypeFrameNum,   "Frame index for until operation - defaults to 0"},
+{ LLDB_OPT_SET_1, false, "frame",   'f', required_argument, NULL,               0, eArgTypeFrameIndex,   "Frame index for until operation - defaults to 0"},
 { LLDB_OPT_SET_1, false, "thread",  't', required_argument, NULL,               0, eArgTypeThreadIndex,  "Thread index for the thread for until operation"},
 { LLDB_OPT_SET_1, false, "run-mode",'m', required_argument, g_duo_running_mode, 0, eArgTypeRunMode,"Determine how to run other threads while stepping this one"},
 { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL }
@@ -1222,9 +1270,21 @@
         CommandObject (interpreter,
                        "thread select",
                        "Select a thread as the currently active thread.",
-                       "thread select <thread-index>",
+                       NULL,
                        eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
     {
+        CommandArgumentEntry arg;
+        CommandArgumentData thread_idx_arg;
+        
+        // Define the first (and only) variant of this arg.
+        thread_idx_arg.arg_type = eArgTypeThreadIndex;
+        thread_idx_arg.arg_repetition = eArgRepeatPlain;
+        
+        // There is only one variant this argument could be; put it into the argument entry.
+        arg.push_back (thread_idx_arg);
+        
+        // Push the data for the first argument into the m_arguments vector.
+        m_arguments.push_back (arg);
     }
 
 
@@ -1377,7 +1437,7 @@
                                                     interpreter,
                                                     "thread step-in",
                                                     "Source level single step in specified thread (current thread, if none specified).",
-                                                    "thread step-in [<thread-id>]",
+                                                    NULL,
                                                     eFlagProcessMustBeLaunched | eFlagProcessMustBePaused,
                                                     eStepTypeInto,
                                                     eStepScopeSource)));
@@ -1386,7 +1446,7 @@
                                                     interpreter,
                                                     "thread step-out",
                                                     "Finish executing the current fucntion and return to its call site in specified thread (current thread, if none specified).",
-                                                    "thread step-out [<thread-id>]",
+                                                    NULL,
                                                     eFlagProcessMustBeLaunched | eFlagProcessMustBePaused,
                                                     eStepTypeOut,
                                                     eStepScopeSource)));
@@ -1395,7 +1455,7 @@
                                                     interpreter,
                                                     "thread step-over",
                                                     "Source level single step in specified thread (current thread, if none specified), stepping over calls.",
-                                                    "thread step-over [<thread-id>]",
+                                                    NULL,
                                                     eFlagProcessMustBeLaunched | eFlagProcessMustBePaused,
                                                     eStepTypeOver,
                                                     eStepScopeSource)));
@@ -1404,7 +1464,7 @@
                                                     interpreter,
                                                     "thread step-inst",
                                                     "Single step one instruction in specified thread (current thread, if none specified).",
-                                                    "thread step-inst [<thread-id>]",
+                                                    NULL,
                                                     eFlagProcessMustBeLaunched | eFlagProcessMustBePaused,
                                                     eStepTypeTrace,
                                                     eStepScopeInstruction)));
@@ -1413,7 +1473,7 @@
                                                     interpreter,
                                                     "thread step-inst-over",
                                                     "Single step one instruction in specified thread (current thread, if none specified), stepping over calls.",
-                                                    "thread step-inst-over [<thread-id>]",
+                                                    NULL,
                                                     eFlagProcessMustBeLaunched | eFlagProcessMustBePaused,
                                                     eStepTypeTraceOver,
                                                     eStepScopeInstruction)));

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Oct  4 17:28:36 2010
@@ -166,7 +166,7 @@
     break_regex_cmd_ap(new CommandObjectRegexCommand (*this,
                                                       "regexp-break",
                                                       "Set a breakpoint using a regular expression to specify the location.",
-                                                      "regexp-break [<file>:<line>]\nregexp-break [<address>]\nregexp-break <...>", 2));
+                                                      "regexp-break [<filename>:<linenum>]\nregexp-break [<address>]\nregexp-break <...>", 2));
     if (break_regex_cmd_ap.get())
     {
         if (break_regex_cmd_ap->AddRegexCommand("^(.*[^[:space:]])[[:space:]]*:[[:space:]]*([[:digit:]]+)[[:space:]]*$", "breakpoint set --file '%1' --line %2") &&

Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=115570&r1=115569&r2=115570&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Mon Oct  4 17:28:36 2010
@@ -85,7 +85,7 @@
         StreamString syntax_str;
         syntax_str.Printf ("%s", GetCommandName());
         if (GetOptions() != NULL)
-            syntax_str.Printf (" <cmd-options> ");
+            syntax_str.Printf (" <cmd-options>");
         if (m_arguments.size() > 0)
         {
             syntax_str.Printf (" ");
@@ -511,6 +511,20 @@
     return entry->arg_name;
 }
 
+bool
+CommandObject::IsPairType (lldb::ArgumentRepetitionType arg_repeat_type)
+{
+    if ((arg_repeat_type == eArgRepeatPairPlain)
+        ||  (arg_repeat_type == eArgRepeatPairOptional)
+        ||  (arg_repeat_type == eArgRepeatPairPlus)
+        ||  (arg_repeat_type == eArgRepeatPairStar)
+        ||  (arg_repeat_type == eArgRepeatPairRange)
+        ||  (arg_repeat_type == eArgRepeatPairRangeOptional))
+        return true;
+
+    return false;
+}
+
 void
 CommandObject::GetFormattedCommandArguments (Stream &str)
 {
@@ -521,27 +535,60 @@
             str.Printf (" ");
         CommandArgumentEntry arg_entry = m_arguments[i];
         int num_alternatives = arg_entry.size();
-        StreamString names;
-        for (int j = 0; j < num_alternatives; ++j)
+
+        if ((num_alternatives == 2)
+            && IsPairType (arg_entry[0].arg_repetition))
         {
-            if (j > 0)
-                names.Printf (" | ");
-            names.Printf ("%s", GetArgumentName (arg_entry[j].arg_type));
+            const char *first_name = GetArgumentName (arg_entry[0].arg_type);
+            const char *second_name = GetArgumentName (arg_entry[1].arg_type);
+            switch (arg_entry[0].arg_repetition)
+            {
+                case eArgRepeatPairPlain:
+                    str.Printf ("<%s> <%s>", first_name, second_name);
+                    break;
+                case eArgRepeatPairOptional:
+                    str.Printf ("[<%s> <%s>]", first_name, second_name);
+                    break;
+                case eArgRepeatPairPlus:
+                    str.Printf ("<%s> <%s> [<%s> <%s> [...]]", first_name, second_name, first_name, second_name);
+                    break;
+                case eArgRepeatPairStar:
+                    str.Printf ("[<%s> <%s> [<%s> <%s> [...]]]", first_name, second_name, first_name, second_name);
+                    break;
+                case eArgRepeatPairRange:
+                    str.Printf ("<%s_1> <%s_1> ... <%s_n> <%s_n>", first_name, second_name, first_name, second_name);
+                    break;
+                case eArgRepeatPairRangeOptional:
+                    str.Printf ("[<%s_1> <%s_1> ... <%s_n> <%s_n>]", first_name, second_name, first_name, second_name);
+                    break;
+            }
         }
-        switch (arg_entry[0].arg_repetition)
+        else
         {
-            case eArgRepeatPlain:
-                str.Printf ("<%s>", names.GetData());
-                break;
-            case eArgRepeatPlus:
-                str.Printf ("<%s> [<%s> [...]]", names.GetData(), names.GetData());
-                break;
-            case eArgRepeatStar:
-                str.Printf ("[<%s> [<%s> [...]]]", names.GetData(), names.GetData());
-                break;
-            case eArgRepeatOptional:
-                str.Printf ("[<%s>]", names.GetData());
-                break;
+            StreamString names;
+            for (int j = 0; j < num_alternatives; ++j)
+            {
+                if (j > 0)
+                    names.Printf (" | ");
+                names.Printf ("%s", GetArgumentName (arg_entry[j].arg_type));
+            }
+            switch (arg_entry[0].arg_repetition)
+            {
+                case eArgRepeatPlain:
+                    str.Printf ("<%s>", names.GetData());
+                    break;
+                case eArgRepeatPlus:
+                    str.Printf ("<%s> [<%s> [...]]", names.GetData(), names.GetData());
+                    break;
+                case eArgRepeatStar:
+                    str.Printf ("[<%s> [<%s> [...]]]", names.GetData(), names.GetData());
+                    break;
+                case eArgRepeatOptional:
+                    str.Printf ("[<%s>]", names.GetData());
+                    break;
+                case eArgRepeatRange:
+                    str.Printf ("<%s_1> .. <%s_n>", names.GetData());
+            }
         }
     }
 }
@@ -573,66 +620,69 @@
 static const char *
 BreakpointIDRangeHelpTextCallback ()
 {
-    return "A 'breakpoint id range' is a manner of specifying multiple breakpoints. This can be done  through several mechanisms.  The easiest way is to just enter a space-separated list of breakpoint ids.  To specify all the breakpoint locations under a major breakpoint, you can use the major breakpoint number followed by '.*', eg. '5.*' means all the locations under breakpoint 5.  You can also indicate a range of breakpoints by using <start-bp-id> - <end-bp-id>.  The start-bp-id and end-bp-id for a range can be any valid breakpoint ids.  It is not legal, however, to specify a range using specific locations that cross major breakpoint numbers.  I.e. 3.2 - 3.7 is legal; 2 - 5 is legal; but 3.2 - 4.4 is not legal.";
+    return "A 'breakpoint id list' is a manner of specifying multiple breakpoints. This can be done  through several mechanisms.  The easiest way is to just enter a space-separated list of breakpoint ids.  To specify all the breakpoint locations under a major breakpoint, you can use the major breakpoint number followed by '.*', eg. '5.*' means all the locations under breakpoint 5.  You can also indicate a range of breakpoints by using <start-bp-id> - <end-bp-id>.  The start-bp-id and end-bp-id for a range can be any valid breakpoint ids.  It is not legal, however, to specify a range using specific locations that cross major breakpoint numbers.  I.e. 3.2 - 3.7 is legal; 2 - 5 is legal; but 3.2 - 4.4 is not legal.";
 }
 
 CommandObject::ArgumentTableEntry
 CommandObject::g_arguments_data[] =
 {
-    { eArgTypeAddress, "address", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeArchitecture, "architecture", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeAddress, "address", CommandCompletions::eNoCompletion, NULL, "A valid address in the target program's execution space." },
+    { eArgTypeAliasName, "alias-name", CommandCompletions::eNoCompletion, NULL, "The name of an abbreviation (alias) for a debugger command." },
+   { eArgTypeAliasOptions, "options-for-aliased-command", CommandCompletions::eNoCompletion, NULL, "Command options to be used as part of an alias (abbreviation) definition.  (See 'help commands alias' for more information.)" },
+    { eArgTypeArchitecture, "arch", CommandCompletions::eNoCompletion, NULL, "The architecture name, e.g. i386 or x86_64." },
     { eArgTypeBoolean, "boolean", CommandCompletions::eNoCompletion, NULL, "A Boolean value: 'true' or 'false'" },
-    { eArgTypeBreakpointID, "breakpoint-id", CommandCompletions::eNoCompletion, BreakpointIDHelpTextCallback, NULL },
-    { eArgTypeBreakpointIDRange, "breakpoint-id-range", CommandCompletions::eNoCompletion, BreakpointIDRangeHelpTextCallback, NULL },
-    { eArgTypeByteSize, "byte-size", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeChannel, "channel", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeBreakpointID, "breakpt-id", CommandCompletions::eNoCompletion, BreakpointIDHelpTextCallback, NULL },
+    { eArgTypeBreakpointIDRange, "breakpt-id-list", CommandCompletions::eNoCompletion, BreakpointIDRangeHelpTextCallback, NULL },
+    { eArgTypeByteSize, "byte-size", CommandCompletions::eNoCompletion, NULL, "Number of bytes to use." },
+    { eArgTypeCommandName, "cmd-name", CommandCompletions::eNoCompletion, NULL, "A debugger command (may be multiple words), without any options or arguments." },
     { eArgTypeCount, "count", CommandCompletions::eNoCompletion, NULL, "An unsigned integer." },
-    { eArgTypeExpression, "expression", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeEndAddress, "end-address", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeExpression, "expr", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
     { eArgTypeExprFormat, "expression-format", CommandCompletions::eNoCompletion, NULL, "[ [bool|b] | [bin] | [char|c] | [oct|o] | [dec|i|d|u] | [hex|x] | [float|f] | [cstr|s] ]" },
     { eArgTypeFilename, "filename", CommandCompletions::eNoCompletion, NULL, "The name of a file (can include path)." },
     { eArgTypeFormat, "format", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeFrameNum, "frame-num", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeFullName, "full-name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeFunctionName, "function-name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeIndex, "index", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeLineNum, "line-num", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeMethod, "method", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeFrameIndex, "frame-index", CommandCompletions::eNoCompletion, NULL, "Index into a thread's list of frames." },
+    { eArgTypeFullName, "fullname", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeFunctionName, "function-name", CommandCompletions::eNoCompletion, NULL, "The name of a function." },
+    { eArgTypeIndex, "index", CommandCompletions::eNoCompletion, NULL, "An index into a list." },
+    { eArgTypeLineNum, "linenum", CommandCompletions::eNoCompletion, NULL, "Line number in a source file." },
+    { eArgTypeLogChannel, "log-channel", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeMethod, "method", CommandCompletions::eNoCompletion, NULL, "A C++ method name." },
     { eArgTypeName, "name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeNumLines, "num-lines", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeNumberPerLine, "number-per-line", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeNewPathPrefix, "new-path-prefix", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeNumLines, "num-lines", CommandCompletions::eNoCompletion, NULL, "The number of lines to use." },
+    { eArgTypeNumberPerLine, "number-per-line", CommandCompletions::eNoCompletion, NULL, "The number of items per line to display." },
     { eArgTypeOffset, "offset", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeOldPathPrefix, "old-path-prefix", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
     { eArgTypeOneLiner, "one-line-breakpoint-command", CommandCompletions::eNoCompletion, NULL, "A breakpoint command that is entered as a single line of text." },
-    { eArgTypeOther, "other", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
     { eArgTypePath, "path", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypePathPrefix, "path-prefix", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypePathPrefixPair, "path-prefix-pair", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypePid, "pid", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypePid, "pid", CommandCompletions::eNoCompletion, NULL, "The process ID number." },
     { eArgTypePlugin, "plugin", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeProcessName, "process-name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeQueueName, "queue-name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeRegisterName, "register-name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeRegularExpression, "regular-expression", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeProcessName, "process-name", CommandCompletions::eNoCompletion, NULL, "The name of the process." },
+    { eArgTypeQueueName, "queue-name", CommandCompletions::eNoCompletion, NULL, "The name of the thread queue." },
+    { eArgTypeRegisterName, "register-name", CommandCompletions::eNoCompletion, NULL, "A register name." },
+    { eArgTypeRegularExpression, "regular-expression", CommandCompletions::eNoCompletion, NULL, "A regular expression." },
+    { eArgTypeRunArgs, "run-args", CommandCompletions::eNoCompletion, NULL, "Arguments to be passed to the target program when it starts executing." },
     { eArgTypeRunMode, "run-mode", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeScriptLang, "script-language", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeSelector, "selector", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeSettingIndex, "setting-index", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeSettingKey, "setting-key", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeSettingPrefix, "setting-prefix", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeSettingVariableName, "setting-variable-name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeShlibName, "shlib-name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeSourceFile, "source-file", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeScriptLang, "script-language", CommandCompletions::eNoCompletion, NULL, "The scripting language to be used for script-based commands.  Currently only Python is valid." },
+    { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, NULL, "The word for which you wish to search for information about." },
+    { eArgTypeSelector, "selector", CommandCompletions::eNoCompletion, NULL, "An Objective-C selector name." },
+    { eArgTypeSettingIndex, "setting-index", CommandCompletions::eNoCompletion, NULL, "An index into a settings variable that is an array (try 'settings list' to see all the possible settings variables and their types)." },
+    { eArgTypeSettingKey, "setting-key", CommandCompletions::eNoCompletion, NULL, "A key into a settings variables that is a dictionary (try 'settings list' to see all the possible settings variables and their types)." },
+    { eArgTypeSettingPrefix, "setting-prefix", CommandCompletions::eNoCompletion, NULL, "The name of a settable internal debugger variable up to a dot ('.'), e.g. 'target.process.'" },
+    { eArgTypeSettingVariableName, "setting-variable-name", CommandCompletions::eNoCompletion, NULL, "The name of a settable internal debugger variable.  Type 'settings list' to see a complete list of such variables." },
+    { eArgTypeShlibName, "shlib-name", CommandCompletions::eNoCompletion, NULL, "The name of a shared library." },
+    { eArgTypeSourceFile, "source-file", CommandCompletions::eNoCompletion, NULL, "The name of a source file.." },
     { eArgTypeStartAddress, "start-address", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeSymbol, "symbol", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeThreadID, "thread-id", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeThreadIndex, "thread-index", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeThreadName, "thread-name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeUUID, "UUID", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeUnixSignalNumber, "unix-signal-number", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeVarName, "var-name", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeValue, "value", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeSymbol, "symbol", CommandCompletions::eNoCompletion, NULL, "Any symbol name (function name, variable, argument, etc.)" },
+    { eArgTypeThreadID, "thread-id", CommandCompletions::eNoCompletion, NULL, "Thread ID number." },
+    { eArgTypeThreadIndex, "thread-index", CommandCompletions::eNoCompletion, NULL, "Index into the process' list of threads." },
+    { eArgTypeThreadName, "thread-name", CommandCompletions::eNoCompletion, NULL, "The thread's name." },
+    { eArgTypeUnixSignalNumber, "unix-signal-number", CommandCompletions::eNoCompletion, NULL, "A valid Unix signal number." },
+    { eArgTypeVarName, "variable-name", CommandCompletions::eNoCompletion, NULL, "The name of a variable in your program." },
+    { eArgTypeValue, "value", CommandCompletions::eNoCompletion, NULL, "A value could be anything, depending on where and how it is used." },
     { eArgTypeWidth, "width", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
-    { eArgTypeNone, "none", CommandCompletions::eNoCompletion, NULL, "Help text goes here." },
+    { eArgTypeNone, "none", CommandCompletions::eNoCompletion, NULL, "No help available for this." },
 };
 
 const CommandObject::ArgumentTableEntry*





More information about the lldb-commits mailing list