From e3d26315672b8ae63b69ae9a3a03281e7b84a42c Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Wed, 8 Sep 2010 21:06:11 +0000 Subject: [PATCH] Clean up, clarify and standardize help text, and fix a few help text formatting problems. llvm-svn: 113408 --- .../Commands/CommandObjectBreakpoint.cpp | 8 ++++---- .../CommandObjectBreakpointCommand.cpp | 8 ++++---- .../source/Commands/CommandObjectCommands.cpp | 6 +++--- lldb/source/Commands/CommandObjectFrame.cpp | 10 ++++++---- lldb/source/Commands/CommandObjectHelp.cpp | 2 +- lldb/source/Commands/CommandObjectImage.cpp | 4 ++-- lldb/source/Commands/CommandObjectLog.cpp | 4 ++-- lldb/source/Commands/CommandObjectMemory.cpp | 4 ++-- lldb/source/Commands/CommandObjectProcess.cpp | 20 +++++++++---------- .../source/Commands/CommandObjectSettings.cpp | 18 ++++++++--------- lldb/source/Commands/CommandObjectSource.cpp | 4 ++-- lldb/source/Commands/CommandObjectTarget.cpp | 8 ++++---- lldb/source/Commands/CommandObjectThread.cpp | 10 +++++----- 13 files changed, 54 insertions(+), 52 deletions(-) diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index bbbdf6b4ed05..9b53d6a0dcb8 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -771,7 +771,7 @@ CommandObjectBreakpointList::Execute CommandObjectBreakpointEnable::CommandObjectBreakpointEnable () : CommandObject ("enable", - "Enables the specified disabled breakpoint(s). If no breakpoints are specified, enables all of them.", + "Enable the specified disabled breakpoint(s). If no breakpoints are specified, enable all of them.", "breakpoint enable [ | ]") { // This command object can either be called via 'enable' or 'breakpoint enable'. Because it has two different @@ -873,7 +873,7 @@ CommandObjectBreakpointEnable::Execute CommandObjectBreakpointDisable::CommandObjectBreakpointDisable () : CommandObject ("disable", - "Disables the specified breakpoint(s) without removing it/them. If no breakpoints are specified, disables them all.", + "Disable the specified breakpoint(s) without removing it/them. If no breakpoints are specified, disable them all.", "disable [ | ]") { // This command object can either be called via 'enable' or 'breakpoint enable'. Because it has two different @@ -973,7 +973,7 @@ CommandObjectBreakpointDisable::Execute CommandObjectBreakpointDelete::CommandObjectBreakpointDelete() : CommandObject ("breakpoint delete", - "Delete the specified breakpoint(s). If no breakpoints are specified, deletes them all.", + "Delete the specified breakpoint(s). If no breakpoints are specified, delete them all.", "breakpoint delete [ | ]") { } @@ -1208,7 +1208,7 @@ CommandObjectBreakpointModify::CommandOptions::ResetOptionValues () #pragma mark Modify CommandObjectBreakpointModify::CommandObjectBreakpointModify () : - CommandObject ("breakpoint modify", "Modifys the options on a breakpoint or set of breakpoints in the executable.", + CommandObject ("breakpoint modify", "Modify the options on a breakpoint or set of breakpoints in the executable.", "breakpoint modify break-id [break-id ...]") { } diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index 765333b912b1..60c7d8fef5ed 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -50,7 +50,7 @@ CommandObjectBreakpointCommandAdd::CommandOptions::g_option_table[] = "Write the breakpoint command script in the Python scripting language."}, { LLDB_OPT_SET_3, true, "commands", 'c', no_argument, NULL, 0, NULL, - "Write the breakpoint command script using the command line commands."}, + "Write the breakpoint command script using standard debugger commands."}, { 0, false, NULL, 0, 0, NULL, 0, NULL, NULL } }; @@ -112,7 +112,7 @@ CommandObjectBreakpointCommandAdd::CommandOptions::ResetOptionValues () CommandObjectBreakpointCommandAdd::CommandObjectBreakpointCommandAdd () : CommandObject ("add", - "Adds a set of commands to a breakpoint to be executed whenever a breakpoint is hit.", + "Add a set of commands to a breakpoint, to be executed whenever the breakpoint is hit.", "breakpoint command add ") { SetHelpLong ( @@ -193,8 +193,8 @@ initialized: \n\ \n\ (lldb) \n\ \n\ -Special information debugger command breakpoint commands \n\ ---------------------------------------------------------- \n\ +Special information about debugger command breakpoint commands \n\ +-------------------------------------------------------------- \n\ \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\ diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index b48f8ae99771..7f9d151e17b6 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -33,7 +33,7 @@ class CommandObjectCommandsSource : public CommandObject public: CommandObjectCommandsSource() : CommandObject ("commands source", - "Reads in debugger commands from the file and executes them.", + "Read in debugger commands from the file and execute them.", "command source ") { } @@ -139,8 +139,8 @@ class CommandObjectCommandsAlias : public CommandObject public: CommandObjectCommandsAlias () : CommandObject ("commands alias", - "Allows users to define their own debugger command abbreviations.", - "commands alias []") + "Allow users to define their own debugger command abbreviations.", + "commands alias []") { SetHelpLong( "'alias' allows the user to create a short-cut or abbreviation for long \n\ diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index ed36bf7022fc..013e8c908a1a 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -53,7 +53,7 @@ public: CommandObjectFrameInfo () : CommandObject ("frame info", - "Lists information about the currently selected frame in the current thread.", + "List information about the currently selected frame in the current thread.", "frame info", eFlagProcessMustBeLaunched | eFlagProcessMustBePaused) { @@ -96,7 +96,8 @@ public: CommandObjectFrameSelect () : CommandObject ("frame select", - "Select the current frame by index in the current thread.", + //"Select the current frame by index in the current thread.", + "Select a frame by index from within the current thread and make it the current frame.", "frame select ", eFlagProcessMustBeLaunched | eFlagProcessMustBePaused) { @@ -362,12 +363,13 @@ public: } if (addr == LLDB_INVALID_ADDRESS) { - result.GetErrorStream().Printf ("error: %s is not loaded", var_sc.module_sp->GetFileSpec().GetFilename().AsCString()); + result.GetErrorStream().Printf ("error: %s is not loaded\n", + var_sc.module_sp->GetFileSpec().GetFilename().AsCString()); } } else { - result.GetErrorStream().Printf ("error: unable to resolve the variable address 0x%llx", file_addr); + result.GetErrorStream().Printf ("error: unable to resolve the variable address 0x%llx\n", file_addr); } } else diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp index a2959afe7894..78c24521344b 100644 --- a/lldb/source/Commands/CommandObjectHelp.cpp +++ b/lldb/source/Commands/CommandObjectHelp.cpp @@ -112,7 +112,7 @@ CommandObjectHelp::Execute (CommandInterpreter &interpreter, Args& command, Comm const char *long_help = sub_cmd_obj->GetHelpLong(); if ((long_help != NULL) && (strlen (long_help) > 0)) - interpreter.OutputFormattedHelpText (output_strm, "", "", sub_cmd_obj->GetHelpLong(), 1); + output_strm.Printf ("\n%s", long_help); else interpreter.OutputFormattedHelpText (output_strm, "", "", sub_cmd_obj->GetHelp(), 1); output_strm.Printf ("\nSyntax: %s\n", sub_cmd_obj->GetSyntax()); diff --git a/lldb/source/Commands/CommandObjectImage.cpp b/lldb/source/Commands/CommandObjectImage.cpp index e17dd577a5b8..ec99ff745843 100644 --- a/lldb/source/Commands/CommandObjectImage.cpp +++ b/lldb/source/Commands/CommandObjectImage.cpp @@ -887,7 +887,7 @@ public: CommandObjectImageDumpLineTable () : CommandObjectImageDumpSourceFileList ("image dump line-table", "Dump the debug symbol file for one or more executable images.", - "image dump line-table [ ...]") + "image dump line-table [ ...]") { } @@ -974,7 +974,7 @@ public: //------------------------------------------------------------------ CommandObjectImageDump(CommandInterpreter &interpreter) : CommandObjectMultiword ("image dump", - "Dumps information in one or more executable images; 'line-table' expects a source file name", + "A set of commands for dumping information about one or more executable images; 'line-table' expects a source file name", "image dump [symtab|sections|symfile|line-table] [ ...]") { LoadSubCommand (interpreter, "symtab", CommandObjectSP (new CommandObjectImageDumpSymtab ())); diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index a63e2ed78901..f5ad33d5df5e 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -83,7 +83,7 @@ public: { if (args.GetArgumentCount() < 1) { - result.GetErrorStream() << m_cmd_syntax.c_str(); + result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str()); } else { @@ -254,7 +254,7 @@ public: const size_t argc = args.GetArgumentCount(); if (argc == 0) { - result.GetErrorStream() << m_cmd_syntax.c_str(); + result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str()); } else { diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 63879d862739..f5fe0ec62c29 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -178,7 +178,7 @@ public: CommandObjectMemoryRead () : CommandObject ("memory read", - "Read memory from the process being debugged.", + "Read from the memory of the process being debugged.", "memory read [] []", eFlagProcessMustBeLaunched) { @@ -396,7 +396,7 @@ public: CommandObjectMemoryWrite () : CommandObject ("memory write", - "Write memory to the process being debugged.", + "Write to the memory of the process being debugged.", "memory write [] [value1 value2 ...]", eFlagProcessMustBeLaunched) { diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 3ca9e80a7e78..1548e26fe83c 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -103,7 +103,7 @@ public: CommandObjectProcessLaunch () : CommandObject ("process launch", - "Launches the executable in the debugger.", + "Launch the executable in the debugger.", "process launch [] []") { } @@ -454,7 +454,7 @@ public: CommandObjectProcessAttach () : CommandObject ("process attach", - "Attaches to a process.", + "Attach to a process.", "process attach ") { SetHelpLong("Currently, you must set the executable file before you can attach " @@ -683,7 +683,7 @@ public: CommandObjectProcessContinue () : CommandObject ("process continue", - "Continues execution all threads in the current process.", + "Continue execution of all threads in the current process.", "process continue", eFlagProcessMustBeLaunched | eFlagProcessMustBePaused) { @@ -770,7 +770,7 @@ public: CommandObjectProcessDetach () : CommandObject ("process detach", - "Detaches from the current process being debugged.", + "Detach from the current process being debugged.", "process detach", eFlagProcessMustBeLaunched) { @@ -818,7 +818,7 @@ public: CommandObjectProcessSignal () : CommandObject ("process signal", - "Sends a UNIX signal to the current process being debugged.", + "Send a UNIX signal to the current process being debugged.", "process signal ") { } @@ -884,7 +884,7 @@ public: CommandObjectProcessInterrupt () : CommandObject ("process interrupt", - "Interrupts the current process being debugged.", + "Interrupt the current process being debugged.", "process interrupt", eFlagProcessMustBeLaunched) { @@ -945,7 +945,7 @@ public: CommandObjectProcessKill () : CommandObject ("process kill", - "Terminates the current process being debugged.", + "Terminate the current process being debugged.", "process kill", eFlagProcessMustBeLaunched) { @@ -999,9 +999,9 @@ class CommandObjectProcessStatus : public CommandObject { public: CommandObjectProcessStatus () : - CommandObject ("status", - "Shows the current status and location of executing process.", - "status", + CommandObject ("process status", + "Show the current status and location of executing process.", + "process status", 0) { } diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp index ff06172c5eb8..62657bed2d0a 100644 --- a/lldb/source/Commands/CommandObjectSettings.cpp +++ b/lldb/source/Commands/CommandObjectSettings.cpp @@ -62,7 +62,7 @@ CommandObjectMultiwordSettings::~CommandObjectMultiwordSettings () CommandObjectSettingsSet::CommandObjectSettingsSet () : CommandObject ("settings set", - "Allows the user to set or change the value of a single debugger setting variable.", + "Set or change the value of a single debugger setting variable.", "settings set [] "), m_options () { @@ -259,7 +259,7 @@ CommandObjectSettingsSet::GetOptions () CommandObjectSettingsShow::CommandObjectSettingsShow () : CommandObject ("settings show", - "Allows the user to see a single internal debugger setting variable and its value, or lists them all.", + "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 []") { } @@ -365,7 +365,7 @@ CommandObjectSettingsShow::HandleArgumentCompletion (CommandInterpreter &interpr CommandObjectSettingsList::CommandObjectSettingsList () : CommandObject ("settings list", - "Lists the internal debugger settings variables available to the user to 'set' or 'show'.", + "List all the internal debugger settings variables that are available to the user to 'set' or 'show'.", "settings list") { } @@ -407,7 +407,7 @@ CommandObjectSettingsList::Execute (CommandInterpreter &interpreter, CommandObjectSettingsRemove::CommandObjectSettingsRemove () : CommandObject ("settings remove", - "Removes the specified element from an internal debugger settings array or dictionary variable.", + "Remove the specified element from an internal debugger settings array or dictionary variable.", "settings remove [|\"key\"]") { } @@ -502,7 +502,7 @@ CommandObjectSettingsRemove::HandleArgumentCompletion (CommandInterpreter &inter CommandObjectSettingsReplace::CommandObjectSettingsReplace () : CommandObject ("settings replace", - "Replaces the specified element from an internal debugger settings array or dictionary variable.", + "Replace the specified element from an internal debugger settings array or dictionary variable with the specified new value.", "settings replace [|\"\"] ") { } @@ -612,7 +612,7 @@ CommandObjectSettingsReplace::HandleArgumentCompletion (CommandInterpreter &inte CommandObjectSettingsInsertBefore::CommandObjectSettingsInsertBefore () : CommandObject ("settings insert-before", - "Inserts value(s) into an internal debugger settings array variable, immediately before the specified element.", + "Insert value(s) into an internal debugger settings array variable, immediately before the specified element.", "settings insert-before [] ") { } @@ -724,7 +724,7 @@ CommandObjectSettingsInsertBefore::HandleArgumentCompletion (CommandInterpreter CommandObjectSettingsInsertAfter::CommandObjectSettingsInsertAfter () : CommandObject ("settings insert-after", - "Inserts value(s) into an internal debugger settings array variable, immediately after the specified element.", + "Insert value(s) into an internal debugger settings array variable, immediately after the specified element.", "settings insert-after [] ") { } @@ -836,7 +836,7 @@ CommandObjectSettingsInsertAfter::HandleArgumentCompletion (CommandInterpreter & CommandObjectSettingsAppend::CommandObjectSettingsAppend () : CommandObject ("settings append", - "Appends new value to the end of an internal debugger settings array, dictionary or string variable.", + "Append a new value to the end of an internal debugger settings array, dictionary or string variable.", "settings append ") { } @@ -936,7 +936,7 @@ CommandObjectSettingsAppend::HandleArgumentCompletion (CommandInterpreter &inter CommandObjectSettingsClear::CommandObjectSettingsClear () : CommandObject ("settings clear", - "Erases all the contents of an internal debugger settings variables; only valid for variables with clearable types, i.e. strings, arrays or dictionaries.", + "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") { } diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp index 937e624659f8..65a95db78b58 100644 --- a/lldb/source/Commands/CommandObjectSource.cpp +++ b/lldb/source/Commands/CommandObjectSource.cpp @@ -98,7 +98,7 @@ class CommandObjectSourceInfo : public CommandObject public: CommandObjectSourceInfo() : CommandObject ("source info", - "Display info on the source lines from the current executable's debug info.", + "Display information about the source lines from the current executable's debug info.", "source info []") { } @@ -229,7 +229,7 @@ class CommandObjectSourceList : public CommandObject public: CommandObjectSourceList() : CommandObject ("source list", - "Display source files from the current executable's debug info.", + "Display source code (as specified) based on the current executable's debug info.", "source list [] []") { } diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 3c41464e707e..1410d5b46d68 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -99,7 +99,7 @@ public: CommandObjectTargetImageSearchPathsClear () : CommandObject ("target image-search-paths clear", - "Clears all current image search paths substitution pairs from the current target.", + "Clear all current image search path substitution pairs from the current target.", "target image-search-paths clear") { } @@ -134,7 +134,7 @@ public: CommandObjectTargetImageSearchPathsInsert () : CommandObject ("target image-search-paths insert", - "Inserts a new image search paths substitution pair to the current target at the specified index.", + "Insert a new image search path substitution pair into the current target at the specified index.", "target image-search-paths insert [ ] ...") { } @@ -217,7 +217,7 @@ public: CommandObjectTargetImageSearchPathsList () : CommandObject ("target image-search-paths list", - "Lists all current image search paths substitution pairs in the current target.", + "List all current image search path substitution pairs in the current target.", "target image-search-paths list") { } @@ -258,7 +258,7 @@ public: CommandObjectTargetImageSearchPathsQuery () : CommandObject ("target image-search-paths query", - "Transforms a path using the first applicable image search path.", + "Transform a path using the first applicable image search path.", "target image-search-paths query ") { } diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 28520bb561a8..5fa54ed67f31 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -332,7 +332,7 @@ public: CommandObjectThreadBacktrace () : CommandObject ("thread backtrace", - "Shows the stack for one or more threads. If no threads are specified, shows the currently selected thread. Use the thread-index \"all\" to see all threads.", + "Show the stack for one or more threads. If no threads are specified, shows the currently selected thread. Use the thread-index \"all\" to see all threads.", "thread backtrace [] ...", eFlagProcessMustBeLaunched | eFlagProcessMustBePaused), m_options() @@ -793,7 +793,7 @@ public: CommandObjectThreadContinue () : CommandObject ("thread continue", - "Continues execution of one or more threads in an active process.", + "Continue execution of one or more threads in an active process.", "thread continue [ ...]", eFlagProcessMustBeLaunched | eFlagProcessMustBePaused) { @@ -1037,7 +1037,7 @@ public: CommandObjectThreadUntil () : CommandObject ("thread until", - "Runs the current or specified thread until it reaches a given line number or leaves the current function.", + "Run the current or specified thread until it reaches a given line number or leaves the current function.", "thread until [] ", eFlagProcessMustBeLaunched | eFlagProcessMustBePaused), m_options () @@ -1235,7 +1235,7 @@ public: CommandObjectThreadSelect () : CommandObject ("thread select", - "Selects a threads as the currently active thread.", + "Select a threads as the currently active thread.", "thread select ", eFlagProcessMustBeLaunched | eFlagProcessMustBePaused) { @@ -1304,7 +1304,7 @@ public: CommandObjectThreadList (): CommandObject ("thread list", - "Shows a summary of all current threads in a process.", + "Show a summary of all current threads in a process.", "thread list", eFlagProcessMustBeLaunched | eFlagProcessMustBePaused) {