diff options
author | Caroline Tice <ctice@apple.com> | 2010-10-04 22:28:36 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2010-10-04 22:28:36 +0000 |
commit | 405fe67f1424284173459575b1081f42935c50fd (patch) | |
tree | 5110616e8a6ebcd9138f08209dbacf041b50a37a /lldb | |
parent | 3703ff41632ea5f5749f35fe380edc8872f34d6d (diff) | |
download | bcm5719-llvm-405fe67f1424284173459575b1081f42935c50fd.tar.gz bcm5719-llvm-405fe67f1424284173459575b1081f42935c50fd.zip |
Modify existing commands with arguments to use the new argument mechanism
(for standardized argument names, argument help, etc.)
llvm-svn: 115570
Diffstat (limited to 'lldb')
24 files changed, 939 insertions, 135 deletions
diff --git a/lldb/include/lldb/Interpreter/CommandObject.h b/lldb/include/lldb/Interpreter/CommandObject.h index b65cce5b6b9..d30e91349dc 100644 --- a/lldb/include/lldb/Interpreter/CommandObject.h +++ b/lldb/include/lldb/Interpreter/CommandObject.h @@ -134,6 +134,9 @@ public: void GetFormattedCommandArguments (Stream &str); + bool + IsPairType (lldb::ArgumentRepetitionType arg_repeat_type); + enum { eFlagProcessMustBeLaunched = (1 << 0), diff --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h index 37eaadb7495..fdd50c86701 100644 --- a/lldb/include/lldb/lldb-enumerations.h +++ b/lldb/include/lldb/lldb-enumerations.h @@ -511,38 +511,42 @@ typedef enum VarSetOperationType 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 @@ typedef enum CommandArgumentType eArgTypeThreadID, eArgTypeThreadIndex, eArgTypeThreadName, - eArgTypeUUID, eArgTypeUnixSignalNumber, eArgTypeVarName, eArgTypeValue, @@ -569,10 +572,17 @@ typedef enum CommandArgumentType 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; diff --git a/lldb/source/Commands/CommandObjectApropos.cpp b/lldb/source/Commands/CommandObjectApropos.cpp index a0184646de7..545f58cfe49 100644 --- a/lldb/source/Commands/CommandObjectApropos.cpp +++ b/lldb/source/Commands/CommandObjectApropos.cpp @@ -30,8 +30,20 @@ CommandObjectApropos::CommandObjectApropos (CommandInterpreter &interpreter) : 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() diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index 791d68ceb87..a648581cb81 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -692,7 +692,7 @@ CommandObjectBreakpointList::CommandObjectBreakpointList (CommandInterpreter &in // 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 @@ CommandObjectBreakpointEnable::CommandObjectBreakpointEnable (CommandInterpreter // 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 @@ CommandObjectBreakpointDisable::CommandObjectBreakpointDisable (CommandInterpret // 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 @@ CommandObjectBreakpointDelete::CommandObjectBreakpointDelete(CommandInterpreter // 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 @@ CommandObjectBreakpointModify::CommandObjectBreakpointModify (CommandInterpreter // 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. diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index 4134deaef40..a8def7995f4 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -129,7 +129,7 @@ CommandObjectBreakpointCommandAdd::CommandObjectBreakpointCommandAdd (CommandInt 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 @@ Special information about debugger command breakpoint commands \n\ 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 @@ CommandObjectBreakpointCommandRemove::CommandObjectBreakpointCommandRemove (Comm 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 @@ CommandObjectBreakpointCommandList::CommandObjectBreakpointCommandList (CommandI 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 () diff --git a/lldb/source/Commands/CommandObjectCall.cpp b/lldb/source/Commands/CommandObjectCall.cpp index 3e938fccaa6..26746687d9d 100644 --- a/lldb/source/Commands/CommandObjectCall.cpp +++ b/lldb/source/Commands/CommandObjectCall.cpp @@ -110,9 +110,42 @@ CommandObjectCall::CommandObjectCall () : 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 () diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index f21938f5fe2..514d6a42a4f 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -35,8 +35,20 @@ public: 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 @@ public: 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 @@ public: \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 @@ public: 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() diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp index cfb487dc9c1..28863826202 100644 --- a/lldb/source/Commands/CommandObjectDisassemble.cpp +++ b/lldb/source/Commands/CommandObjectDisassemble.cpp @@ -125,8 +125,8 @@ CommandObjectDisassemble::CommandOptions::g_option_table[] = { 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."}, diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 886bc8ba66d..adc8eb153eb 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -106,7 +106,7 @@ CommandObjectExpression::CommandObjectExpression (CommandInterpreter &interprete 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 @@ CommandObjectExpression::CommandObjectExpression (CommandInterpreter &interprete 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 () diff --git a/lldb/source/Commands/CommandObjectFile.cpp b/lldb/source/Commands/CommandObjectFile.cpp index db2bd769d4a..737b0cb4ec8 100644 --- a/lldb/source/Commands/CommandObjectFile.cpp +++ b/lldb/source/Commands/CommandObjectFile.cpp @@ -89,8 +89,20 @@ CommandObjectFile::CommandObjectFile(CommandInterpreter &interpreter) : 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 () diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 7f4f66efabe..239e1123fed 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -98,9 +98,21 @@ public: 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 @@ public: "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 diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp index 4f8b752a2ed..ff666398638 100644 --- a/lldb/source/Commands/CommandObjectHelp.cpp +++ b/lldb/source/Commands/CommandObjectHelp.cpp @@ -31,6 +31,18 @@ CommandObjectHelp::CommandObjectHelp (CommandInterpreter &interpreter) : "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() diff --git a/lldb/source/Commands/CommandObjectImage.cpp b/lldb/source/Commands/CommandObjectImage.cpp index b8c92ae123b..b2ecef23966 100644 --- a/lldb/source/Commands/CommandObjectImage.cpp +++ b/lldb/source/Commands/CommandObjectImage.cpp @@ -482,6 +482,18 @@ public: 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 @@ public: 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 @@ public: CommandObjectImageDumpModuleList (interpreter, "image dump symtab", "Dump the symbol table from one or more executable images.", - "image dump symtab [<file1> ...]") + NULL) { } @@ -674,7 +698,8 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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 diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index 2e0131a0ce9..9bf458dc6bc 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -62,8 +62,20 @@ public: 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 @@ public: 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 @@ public: 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 diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 7b9e1cec95d..46e913587ef 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -180,9 +180,31 @@ public: 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 @@ public: 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 diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 0c08767249f..73d03f5c89a 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -105,8 +105,20 @@ public: 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 @@ public: 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 () diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp index 6182509ee80..4bcf681f633 100644 --- a/lldb/source/Commands/CommandObjectRegister.cpp +++ b/lldb/source/Commands/CommandObjectRegister.cpp @@ -34,10 +34,23 @@ public: 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 @@ public: 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 diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp index 703173cdf75..dc71b64a52b 100644 --- a/lldb/source/Commands/CommandObjectSettings.cpp +++ b/lldb/source/Commands/CommandObjectSettings.cpp @@ -65,9 +65,31 @@ CommandObjectSettingsSet::CommandObjectSettingsSet (CommandInterpreter &interpre 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 @@ CommandObjectSettingsShow::CommandObjectSettingsShow (CommandInterpreter &interp 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 @@ CommandObjectSettingsList::CommandObjectSettingsList (CommandInterpreter &interp 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 @@ CommandObjectSettingsRemove::CommandObjectSettingsRemove (CommandInterpreter &in 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 @@ CommandObjectSettingsReplace::CommandObjectSettingsReplace (CommandInterpreter & 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 @@ CommandObjectSettingsInsertBefore::CommandObjectSettingsInsertBefore (CommandInt 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 @@ CommandObjectSettingsInsertAfter::CommandObjectSettingsInsertAfter (CommandInter 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 @@ CommandObjectSettingsAppend::CommandObjectSettingsAppend (CommandInterpreter &in 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 @@ CommandObjectSettingsClear::CommandObjectSettingsClear (CommandInterpreter &inte 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 () diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp index 3c4084953df..63d319eefed 100644 --- a/lldb/source/Commands/CommandObjectSource.cpp +++ b/lldb/source/Commands/CommandObjectSource.cpp @@ -231,8 +231,20 @@ public: 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 () diff --git a/lldb/source/Commands/CommandObjectSyntax.cpp b/lldb/source/Commands/CommandObjectSyntax.cpp index 8bc49a723e5..667ae7f984c 100644 --- a/lldb/source/Commands/CommandObjectSyntax.cpp +++ b/lldb/source/Commands/CommandObjectSyntax.cpp @@ -33,6 +33,18 @@ CommandObjectSyntax::CommandObjectSyntax (CommandInterpreter &interpreter) : "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() diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 8708d4427ea..14c7c26ec8b 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -38,8 +38,28 @@ public: 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 @@ public: 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 @@ public: 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 () diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index f1b528d5856..203c6b9c519 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -322,10 +322,22 @@ public: 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 @@ lldb::OptionDefinition 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 @@ public: 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 @@ public: 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 @@ public: 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 @@ protected: 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 @@ public: 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 @@ CommandObjectMultiwordThread::CommandObjectMultiwordThread (CommandInterpreter & 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 @@ CommandObjectMultiwordThread::CommandObjectMultiwordThread (CommandInterpreter & 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 @@ CommandObjectMultiwordThread::CommandObjectMultiwordThread (CommandInterpreter & 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 @@ CommandObjectMultiwordThread::CommandObjectMultiwordThread (CommandInterpreter & 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 @@ CommandObjectMultiwordThread::CommandObjectMultiwordThread (CommandInterpreter & 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))); diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index a3c2921eefe..cfa30ea1856 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -166,7 +166,7 @@ CommandInterpreter::LoadCommandDictionary () 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") && diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index c53abef0702..8cd8b499299 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -85,7 +85,7 @@ CommandObject::GetSyntax () 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 @@ CommandObject::GetArgumentName (CommandArgumentType arg_type) 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 @@ CommandObject::GetFormattedCommandArguments (Stream &str) 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 @@ BreakpointIDHelpTextCallback () 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* |