eAccessPackage
};
- enum CommandArgumentType
+ enum CommandArgumentType
{
eArgTypeAddress = 0,
eArgTypeAddressOrExpression,
eArgTypeWatchpointID,
eArgTypeWatchpointIDRange,
eArgTypeWatchType,
- eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!!
+ eArgRawInput,
+ eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!!
};
//----------------------------------------------------------------------
self.expect("breakpoint command list 1",
startstr = "Breakpoint 1 does not have an associated command.")
self.expect("breakpoint command list 2", error=True,
- startstr = "error: '2' is not a currently valid breakpoint id.")
+ startstr = "error: '2' is not a currently valid breakpoint ID.")
# The breakpoint list now only contains breakpoint 1.
self.expect("breakpoint list -f", "Breakpoint 1 exists",
'For more information run'])
self.expect("help targetname",
- substrs = ['This', 'command', 'takes', '\'raw\'', 'input',
- 'quote', 'stuff'])
+ substrs = ['Expects', '\'raw\'', 'input',
+ 'help', 'raw-input'])
self.expect("longwait",
substrs = ['Done; if you saw the delays I am doing OK'])
self.runCmd('command alias foself fo self')
self.expect('help foself', substrs=['--show-all-children', '--raw-output'], matching=False)
- self.expect('help foself', substrs=['Show frame variables.'], matching=True)
+ self.expect('help foself', substrs=['Show variables for the current', 'stack frame.'], matching=True)
def test_help_version(self):
"""Test 'help version' and 'version' commands."""
self.expect("help version",
- substrs = ['Show version of LLDB debugger.'])
+ substrs = ['Show the LLDB debugger version.'])
version_str = self.version_number_string()
import re
match = re.match('[0-9]+', version_str)
// CommandObjectApropos
//-------------------------------------------------------------------------
-CommandObjectApropos::CommandObjectApropos (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "apropos",
- "Find a list of debugger commands related to a particular word/subject.",
- nullptr)
+CommandObjectApropos::CommandObjectApropos(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "apropos", "List debugger commands related to a word or subject.", nullptr)
{
CommandArgumentEntry arg;
CommandArgumentData search_word_arg;
class CommandObjectBreakpointDisable : public CommandObjectParsed
{
public:
- CommandObjectBreakpointDisable (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "breakpoint disable",
- "Disable the specified breakpoint(s) without removing them. If none are specified, disable all breakpoints.",
- nullptr)
+ CommandObjectBreakpointDisable(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "breakpoint disable", "Disable the specified breakpoint(s) without deleting "
+ "them. If none are specified, disable all "
+ "breakpoints.",
+ nullptr)
{
- SetHelpLong(
-"Disable the specified breakpoint(s) without removing them. \
-If none are specified, disable all breakpoints." R"(
+ SetHelpLong("Disable the specified breakpoint(s) without deleting them. \
+If none are specified, disable all breakpoints."
+ R"(
-)" "Note: disabling a breakpoint will cause none of its locations to be hit \
-regardless of whether they are enabled or disabled. After the sequence:" R"(
+)"
+ "Note: disabling a breakpoint will cause none of its locations to be hit \
+regardless of whether individual locations are enabled or disabled. After the sequence:"
+ R"(
(lldb) break disable 1
(lldb) break enable 1.1
(lldb) break disable 1.*
(lldb) break enable 1.1
-)" "The first command disables all the locations of breakpoint 1, \
-the second re-enables the first location."
- );
-
+)"
+ "The first command disables all locations for breakpoint 1, \
+the second re-enables the first location.");
+
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID, eArgTypeBreakpointIDRange);
// Add the entry for the first argument for this command to the object's arguments vector.
}
else
{
- result.AppendError ("Invalid breakpoint id.");
+ result.AppendError("Invalid breakpoint ID.");
result.SetStatus (eReturnStatusFailed);
}
}
eClearTypeFileAndLine
} BreakpointClearType;
- CommandObjectBreakpointClear (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "breakpoint clear",
- "Clears a breakpoint or set of breakpoints in the executable.",
- "breakpoint clear <cmd-options>"),
- m_options (interpreter)
+ CommandObjectBreakpointClear(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "breakpoint clear",
+ "Delete or disable breakpoints matching the specified source file and line.",
+ "breakpoint clear <cmd-options>"),
+ m_options(interpreter)
{
}
// CommandObjectBreakpointName
//-------------------------------------------------------------------------
-static OptionDefinition
-g_breakpoint_name_options[] =
-{
- { LLDB_OPT_SET_1, false, "name", 'N', OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeBreakpointName, "Specifies a breakpoint name to use."},
- { LLDB_OPT_SET_2, false, "breakpoint-id", 'B', OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeBreakpointID, "Specify a breakpoint id to use."},
- { LLDB_OPT_SET_ALL, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone,
- "Operate on Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets."},
+static OptionDefinition g_breakpoint_name_options[] = {
+ {LLDB_OPT_SET_1, false, "name", 'N', OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeBreakpointName,
+ "Specifies a breakpoint name to use."},
+ {LLDB_OPT_SET_2, false, "breakpoint-id", 'B', OptionParser::eRequiredArgument, nullptr, nullptr, 0,
+ eArgTypeBreakpointID, "Specify a breakpoint ID to use."},
+ {LLDB_OPT_SET_ALL, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone,
+ "Operate on Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets."},
};
class BreakpointNameOptionGroup : public OptionGroup
{
class CommandObjectBreakpointName : public CommandObjectMultiword
{
public:
- CommandObjectBreakpointName (CommandInterpreter &interpreter) :
- CommandObjectMultiword(interpreter,
- "name",
- "A set of commands to manage name tags for breakpoints",
- "breakpoint name <command> [<command-options>]")
+ CommandObjectBreakpointName(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "name", "Commands to manage name tags for breakpoints",
+ "breakpoint name <subcommand> [<command-options>]")
{
CommandObjectSP add_command_object (new CommandObjectBreakpointNameAdd (interpreter));
CommandObjectSP delete_command_object (new CommandObjectBreakpointNameDelete (interpreter));
//-------------------------------------------------------------------------
#pragma mark MultiwordBreakpoint
-CommandObjectMultiwordBreakpoint::CommandObjectMultiwordBreakpoint (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "breakpoint",
- "A set of commands for operating on breakpoints. Also see _regexp-break.",
- "breakpoint <command> [<command-options>]")
+CommandObjectMultiwordBreakpoint::CommandObjectMultiwordBreakpoint(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "breakpoint",
+ "Commands for operating on breakpoints (see 'help b' for shorthand.)",
+ "breakpoint <subcommand> [<command-options>]")
{
CommandObjectSP list_command_object (new CommandObjectBreakpointList (interpreter));
CommandObjectSP enable_command_object (new CommandObjectBreakpointEnable (interpreter));
else
{
i = valid_ids->GetSize() + 1;
- result.AppendErrorWithFormat ("'%d' is not a currently valid breakpoint id.\n", cur_bp_id.GetBreakpointID());
+ result.AppendErrorWithFormat("'%d' is not a currently valid breakpoint ID.\n",
+ cur_bp_id.GetBreakpointID());
result.SetStatus (eReturnStatusFailed);
}
}
public IOHandlerDelegateMultiline
{
public:
- CommandObjectBreakpointCommandAdd (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "add",
- "Add a set of commands to a breakpoint, to be executed whenever the breakpoint is hit."
- " If no breakpoint is specified, adds the commands to the last created breakpoint.",
- nullptr),
- IOHandlerDelegateMultiline ("DONE", IOHandlerDelegate::Completion::LLDBCommand),
- m_options (interpreter)
+ CommandObjectBreakpointCommandAdd(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "add",
+ "Add LLDB commands to a breakpoint, to be executed whenever the breakpoint is hit."
+ " If no breakpoint is specified, adds the commands to the last created breakpoint.",
+ nullptr),
+ IOHandlerDelegateMultiline("DONE", IOHandlerDelegate::Completion::LLDBCommand),
+ m_options(interpreter)
{
SetHelpLong (
R"(
// CommandObjectBreakpointCommand
//-------------------------------------------------------------------------
-CommandObjectBreakpointCommand::CommandObjectBreakpointCommand (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "command",
- "A set of commands for adding, removing and examining bits of code to be executed when the breakpoint is hit (breakpoint 'commands').",
- "command <sub-command> [<sub-command-options>] <breakpoint-id>")
+CommandObjectBreakpointCommand::CommandObjectBreakpointCommand(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(
+ interpreter, "command",
+ "Commands for adding, removing and listing LLDB commands executed when a breakpoint is hit.",
+ "command <sub-command> [<sub-command-options>] <breakpoint-id>")
{
CommandObjectSP add_command_object (new CommandObjectBreakpointCommandAdd (interpreter));
CommandObjectSP delete_command_object (new CommandObjectBreakpointCommandDelete (interpreter));
// CommandObjectMultiwordBugreport
//-------------------------------------------------------------------------
-CommandObjectMultiwordBugreport::CommandObjectMultiwordBugreport(CommandInterpreter &interpreter) :
- CommandObjectMultiword(interpreter,
- "bugreport",
- "Set of commands for creating domain specific bugreports.",
- "bugreport <subcommand> [<subcommand-options>]")
+CommandObjectMultiwordBugreport::CommandObjectMultiwordBugreport(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "bugreport", "Commands for creating domain-specific bug reports.",
+ "bugreport <subcommand> [<subcommand-options>]")
{
LoadSubCommand("unwind", CommandObjectSP(new CommandObjectBugreportUnwind(interpreter)));
class CommandObjectCommandsSource : public CommandObjectParsed
{
public:
- CommandObjectCommandsSource(CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "command source",
- "Read in debugger commands from the file <filename> and execute them.",
- nullptr),
- m_options (interpreter)
+ CommandObjectCommandsSource(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "command source", "Read and execute LLDB commands from the file <filename>.",
+ nullptr),
+ m_options(interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData file_arg;
return &m_option_group;
}
- CommandObjectCommandsAlias (CommandInterpreter &interpreter) :
- CommandObjectRaw(interpreter,
- "command alias",
- "Allow users to define their own debugger command abbreviations.",
- nullptr),
- m_option_group(interpreter),
- m_command_options()
+ CommandObjectCommandsAlias(CommandInterpreter &interpreter)
+ : CommandObjectRaw(interpreter, "command alias", "Define a custom command in terms of an existing command.",
+ nullptr),
+ m_option_group(interpreter),
+ m_command_options()
{
m_option_group.Append(&m_command_options);
m_option_group.Finalize();
class CommandObjectCommandsUnalias : public CommandObjectParsed
{
public:
- CommandObjectCommandsUnalias (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "command unalias",
- "Allow the user to remove/delete a user-defined command abbreviation.",
- nullptr)
+ CommandObjectCommandsUnalias(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "command unalias",
+ "Delete one or more custom commands defined by 'command alias'.", nullptr)
{
CommandArgumentEntry arg;
CommandArgumentData alias_arg;
class CommandObjectCommandsDelete : public CommandObjectParsed
{
public:
- CommandObjectCommandsDelete (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "command delete",
- "Allow the user to delete user-defined regular expression, python or multi-word commands.",
- nullptr)
+ CommandObjectCommandsDelete(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "command delete",
+ "Delete one or more custom commands defined by 'command regex'.", nullptr)
{
CommandArgumentEntry arg;
CommandArgumentData alias_arg;
}
else
{
- result.AppendErrorWithFormat ("must call '%s' with one or more valid user defined regular expression, python or multi-word command names", GetCommandName ());
+ result.AppendErrorWithFormat(
+ "must call '%s' with one or more valid user defined regular expression command names",
+ GetCommandName());
result.SetStatus (eReturnStatusFailed);
}
public IOHandlerDelegateMultiline
{
public:
- CommandObjectCommandsAddRegex (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "command regex",
- "Allow the user to create a regular expression command.",
- "command regex <cmd-name> [s/<regex>/<subst>/ ...]"),
- IOHandlerDelegateMultiline ("", IOHandlerDelegate::Completion::LLDBCommand),
- m_options (interpreter)
+ CommandObjectCommandsAddRegex(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "command regex",
+ "Define a custom command in terms of existing commands by matching regular expressions.",
+ "command regex <cmd-name> [s/<regex>/<subst>/ ...]"),
+ IOHandlerDelegateMultiline("", IOHandlerDelegate::Completion::LLDBCommand),
+ m_options(interpreter)
{
SetHelpLong(R"(
)" "This command allows the user to create powerful regular expression commands \
class CommandObjectMultiwordCommandsScript : public CommandObjectMultiword
{
public:
- CommandObjectMultiwordCommandsScript (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "command script",
- "A set of commands for managing or customizing script commands.",
- "command script <subcommand> [<subcommand-options>]")
+ CommandObjectMultiwordCommandsScript(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "command script",
+ "Commands for managing custom commands implemented by interpreter scripts.",
+ "command script <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("add", CommandObjectSP (new CommandObjectCommandsScriptAdd (interpreter)));
LoadSubCommand ("delete", CommandObjectSP (new CommandObjectCommandsScriptDelete (interpreter)));
// CommandObjectMultiwordCommands
//-------------------------------------------------------------------------
-CommandObjectMultiwordCommands::CommandObjectMultiwordCommands (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "command",
- "A set of commands for managing or customizing the debugger commands.",
- "command <subcommand> [<subcommand-options>]")
+CommandObjectMultiwordCommands::CommandObjectMultiwordCommands(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "command", "Commands for managing custom LLDB commands.",
+ "command <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("source", CommandObjectSP (new CommandObjectCommandsSource (interpreter)));
LoadSubCommand ("alias", CommandObjectSP (new CommandObjectCommandsAlias (interpreter)));
// CommandObjectDisassemble
//-------------------------------------------------------------------------
-CommandObjectDisassemble::CommandObjectDisassemble (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "disassemble",
- "Disassemble bytes in the current function, or elsewhere in the executable program as specified by the user.",
- "disassemble [<cmd-options>]"),
- m_options (interpreter)
+CommandObjectDisassemble::CommandObjectDisassemble(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "disassemble", "Disassemble specified instructions in the current target. "
+ "Defaults to the current function for the current thread and "
+ "stack frame.",
+ "disassemble [<cmd-options>]"),
+ m_options(interpreter)
{
}
return g_option_table;
}
-CommandObjectExpression::CommandObjectExpression (CommandInterpreter &interpreter) :
- CommandObjectRaw(interpreter,
- "expression",
- "Evaluate an expression in the current program context, using user defined variables and variables currently in scope.",
- nullptr,
- eCommandProcessMustBePaused | eCommandTryTargetAPILock),
- IOHandlerDelegate (IOHandlerDelegate::Completion::Expression),
- m_option_group (interpreter),
- m_format_options (eFormatDefault),
- m_repl_option (LLDB_OPT_SET_1, false, "repl", 'r', "Drop into REPL", false, true),
- m_command_options (),
- m_expr_line_count (0),
- m_expr_lines ()
+CommandObjectExpression::CommandObjectExpression(CommandInterpreter &interpreter)
+ : CommandObjectRaw(
+ interpreter, "expression",
+ "Evaluate an expression on the current thread. Displays any returned value with LLDB's default formatting.",
+ nullptr, eCommandProcessMustBePaused | eCommandTryTargetAPILock),
+ IOHandlerDelegate(IOHandlerDelegate::Completion::Expression),
+ m_option_group(interpreter),
+ m_format_options(eFormatDefault),
+ m_repl_option(LLDB_OPT_SET_1, false, "repl", 'r', "Drop into REPL", false, true),
+ m_command_options(),
+ m_expr_line_count(0),
+ m_expr_lines()
{
SetHelpLong(
R"(
class CommandObjectFrameInfo : public CommandObjectParsed
{
public:
- CommandObjectFrameInfo (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "frame info",
- "List information about the currently selected frame in the current thread.",
- "frame info",
- eCommandRequiresFrame |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused )
+ CommandObjectFrameInfo(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "frame info",
+ "List information about the current stack frame in the current thread.", "frame info",
+ eCommandRequiresFrame | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
+ eCommandProcessMustBePaused)
{
}
static OptionDefinition g_option_table[];
int32_t relative_frame_offset;
};
-
- CommandObjectFrameSelect (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "frame select",
- "Select a frame by index from within the current thread and make it the current frame.",
- nullptr,
- eCommandRequiresThread |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused ),
- m_options (interpreter)
+
+ CommandObjectFrameSelect(CommandInterpreter &interpreter)
+ : CommandObjectParsed(
+ interpreter, "frame select",
+ "Select the current stack frame by index from within the current thread (see 'thread backtrace'.)",
+ nullptr, eCommandRequiresThread | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
+ eCommandProcessMustBePaused),
+ m_options(interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData index_arg;
if (frame_idx == 0)
{
//If you are already at the bottom of the stack, then just warn and don't reset the frame.
- result.AppendError("Already at the bottom of the stack");
+ result.AppendError("Already at the bottom of the stack.");
result.SetStatus(eReturnStatusFailed);
return false;
}
if (frame_idx == num_frames - 1)
{
//If we are already at the top of the stack, just warn and don't reset the frame.
- result.AppendError("Already at the top of the stack");
+ result.AppendError("Already at the top of the stack.");
result.SetStatus(eReturnStatusFailed);
return false;
}
frame_idx = StringConvert::ToUInt32 (frame_idx_cstr, UINT32_MAX, 0, &success);
if (!success)
{
- result.AppendErrorWithFormat ("invalid frame index argument '%s'", frame_idx_cstr);
+ result.AppendErrorWithFormat("invalid frame index argument '%s'.", frame_idx_cstr);
result.SetStatus (eReturnStatusFailed);
return false;
}
class CommandObjectFrameVariable : public CommandObjectParsed
{
public:
- CommandObjectFrameVariable (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "frame variable",
- "Show frame variables. All argument and local variables "
- "that are in scope will be shown when no arguments are given. "
- "If any arguments are specified, they can be names of "
- "argument, local, file static and file global variables. "
- "Children of aggregate variables can be specified such as "
- "'var->child.x'.",
- nullptr,
- eCommandRequiresFrame |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused |
- eCommandRequiresProcess),
- m_option_group (interpreter),
- m_option_variable(true), // Include the frame specific options by passing "true"
- m_option_format (eFormatDefault),
- m_varobj_options()
+ CommandObjectFrameVariable(CommandInterpreter &interpreter)
+ : CommandObjectParsed(
+ interpreter, "frame variable", "Show variables for the current stack frame. Defaults to all "
+ "arguments and local variables in scope. Names of argument, "
+ "local, file static and file global variables can be specified. "
+ "Children of aggregate variables can be specified such as "
+ "'var->child.x'.",
+ nullptr, eCommandRequiresFrame | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
+ eCommandProcessMustBePaused | eCommandRequiresProcess),
+ m_option_group(interpreter),
+ m_option_variable(true), // Include the frame specific options by passing "true"
+ m_option_format(eFormatDefault),
+ m_varobj_options()
{
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
if (error_cstr)
result.GetErrorStream().Printf("error: %s\n", error_cstr);
else
- result.GetErrorStream().Printf ("error: unable to find any variable expression path that matches '%s'\n", name_cstr);
+ result.GetErrorStream().Printf(
+ "error: unable to find any variable expression path that matches '%s'.\n",
+ name_cstr);
}
}
}
// CommandObjectMultiwordFrame
//-------------------------------------------------------------------------
-CommandObjectMultiwordFrame::CommandObjectMultiwordFrame (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "frame",
- "A set of commands for operating on the current thread's frames.",
- "frame <subcommand> [<subcommand-options>]")
+CommandObjectMultiwordFrame::CommandObjectMultiwordFrame(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "frame",
+ "Commands for selecting and examing the current thread's stack frames.",
+ "frame <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("info", CommandObjectSP (new CommandObjectFrameInfo (interpreter)));
LoadSubCommand ("select", CommandObjectSP (new CommandObjectFrameSelect (interpreter)));
}
}
-CommandObjectHelp::CommandObjectHelp (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "help",
- "Show a list of all debugger commands, or give details about specific commands.",
- "help [<cmd-name>]"), m_options (interpreter)
+CommandObjectHelp::CommandObjectHelp(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "help",
+ "Show a list of all debugger commands, or give details about a specific command.",
+ "help [<cmd-name>]"),
+ m_options(interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData command_arg;
using namespace lldb;
using namespace lldb_private;
-CommandObjectLanguage::CommandObjectLanguage (CommandInterpreter &interpreter) :
-CommandObjectMultiword (interpreter,
- "language",
- "A set of commands for managing language-specific functionality.'.",
- "language <language-name> <subcommand> [<subcommand-options>]"
- )
+CommandObjectLanguage::CommandObjectLanguage(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "language", "Commands specific to a source language.",
+ "language <language-name> <subcommand> [<subcommand-options>]")
{
//Let the LanguageRuntime populates this command with subcommands
LanguageRuntime::InitializeCommands(this);
}
-void
-CommandObjectLanguage::GenerateHelpText (Stream &output_stream) {
- CommandObjectMultiword::GenerateHelpText(output_stream);
-}
-
CommandObjectLanguage::~CommandObjectLanguage ()
{
}
~CommandObjectLanguage() override;
- void
- GenerateHelpText(Stream &output_stream) override;
-
protected:
bool
DoExecute (Args& command, CommandReturnObject &result);
}
};
-CommandObjectLog::CommandObjectLog(CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "log",
- "A set of commands for operating on logs.",
- "log <command> [<command-options>]")
+CommandObjectLog::CommandObjectLog(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "log", "Commands controlling LLDB internal logging.",
+ "log <subcommand> [<command-options>]")
{
LoadSubCommand ("enable", CommandObjectSP (new CommandObjectLogEnable (interpreter)));
LoadSubCommand ("disable", CommandObjectSP (new CommandObjectLogDisable (interpreter)));
if (byte_size_option_set)
{
if (byte_size_value > 1)
- error.SetErrorStringWithFormat ("display format (bytes/bytes with ascii) conflicts with the specified byte size %" PRIu64 "\n"
- "\tconsider using a different display format or don't specify the byte size",
- byte_size_value.GetCurrentValue());
+ error.SetErrorStringWithFormat(
+ "display format (bytes/bytes with ASCII) conflicts with the specified byte size %" PRIu64
+ "\n"
+ "\tconsider using a different display format or don't specify the byte size.",
+ byte_size_value.GetCurrentValue());
}
else
byte_size_value = 1;
class CommandObjectMemoryRead : public CommandObjectParsed
{
public:
- CommandObjectMemoryRead (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "memory read",
- "Read from the memory of the process being debugged.",
- nullptr,
- eCommandRequiresTarget | eCommandProcessMustBePaused),
- m_option_group (interpreter),
- m_format_options (eFormatBytesWithASCII, 1, 8),
- m_memory_options (),
- m_outfile_options (),
- m_varobj_options(),
- m_next_addr(LLDB_INVALID_ADDRESS),
- m_prev_byte_size(0),
- m_prev_format_options (eFormatBytesWithASCII, 1, 8),
- m_prev_memory_options (),
- m_prev_outfile_options (),
- m_prev_varobj_options()
+ CommandObjectMemoryRead(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "memory read", "Read from the memory of the current target process.",
+ nullptr, eCommandRequiresTarget | eCommandProcessMustBePaused),
+ m_option_group(interpreter),
+ m_format_options(eFormatBytesWithASCII, 1, 8),
+ m_memory_options(),
+ m_outfile_options(),
+ m_varobj_options(),
+ m_next_addr(LLDB_INVALID_ADDRESS),
+ m_prev_byte_size(0),
+ m_prev_format_options(eFormatBytesWithASCII, 1, 8),
+ m_prev_memory_options(),
+ m_prev_outfile_options(),
+ m_prev_varobj_options()
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
OptionValueUInt64 m_count;
OptionValueUInt64 m_offset;
};
-
- CommandObjectMemoryFind (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "memory find",
- "Find a value in the memory of the process being debugged.",
- nullptr,
- eCommandRequiresProcess | eCommandProcessMustBeLaunched),
- m_option_group (interpreter),
- m_memory_options ()
+
+ CommandObjectMemoryFind(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "memory find", "Find a value in the memory of the current target process.",
+ nullptr, eCommandRequiresProcess | eCommandProcessMustBeLaunched),
+ m_option_group(interpreter),
+ m_memory_options()
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
off_t m_infile_offset;
};
- CommandObjectMemoryWrite (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "memory write",
- "Write to the memory of the process being debugged.",
- nullptr,
- eCommandRequiresProcess | eCommandProcessMustBeLaunched),
- m_option_group (interpreter),
- m_format_options (eFormatBytes, 1, UINT64_MAX),
- m_memory_options ()
+ CommandObjectMemoryWrite(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "memory write", "Write to the memory of the current target process.",
+ nullptr, eCommandRequiresProcess | eCommandProcessMustBeLaunched),
+ m_option_group(interpreter),
+ m_format_options(eFormatBytes, 1, UINT64_MAX),
+ m_memory_options()
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
class CommandObjectMemoryHistory : public CommandObjectParsed
{
public:
- CommandObjectMemoryHistory (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "memory history",
- "Prints out the recorded stack traces for allocation/deallocation of a memory address.",
- nullptr,
- eCommandRequiresTarget | eCommandRequiresProcess | eCommandProcessMustBePaused |
- eCommandProcessMustBeLaunched)
+ CommandObjectMemoryHistory(CommandInterpreter &interpreter)
+ : CommandObjectParsed(
+ interpreter, "memory history",
+ "Print recorded stack traces for allocation/deallocation events associated with an address.", nullptr,
+ eCommandRequiresTarget | eCommandRequiresProcess | eCommandProcessMustBePaused |
+ eCommandProcessMustBeLaunched)
{
CommandArgumentEntry arg1;
CommandArgumentData addr_arg;
{
public:
CommandObjectMemoryRegion(CommandInterpreter &interpreter)
- : CommandObjectParsed(interpreter, "memory region",
- "Get information on a memory region that contains an address in the current process.",
- "memory region ADDR",
- eCommandRequiresProcess | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched),
+ : CommandObjectParsed(
+ interpreter, "memory region",
+ "Get information on the memory region containing an address in the current target process.",
+ "memory region ADDR", eCommandRequiresProcess | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched),
m_prev_end_addr(LLDB_INVALID_ADDRESS)
{
}
// CommandObjectMemory
//-------------------------------------------------------------------------
-CommandObjectMemory::CommandObjectMemory (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "memory",
- "A set of commands for operating on memory.",
- "memory <subcommand> [<subcommand-options>]")
+CommandObjectMemory::CommandObjectMemory(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "memory", "Commands for operating on memory in the current target process.",
+ "memory <subcommand> [<subcommand-options>]")
{
LoadSubCommand("find", CommandObjectSP(new CommandObjectMemoryFind(interpreter)));
LoadSubCommand("read", CommandObjectSP(new CommandObjectMemoryRead(interpreter)));
// First time through here, generate the help text for the object and
// push it to the return result object as well
- output_stream.PutCString ("The following subcommands are supported:\n\n");
+ CommandObject::GenerateHelpText(output_stream);
+ output_stream.PutCString("\nThe following subcommands are supported:\n\n");
CommandMap::iterator pos;
uint32_t max_len = FindLongestCommandWord (m_subcommand_dict);
if (pos->second->WantsRawCommandString ())
{
std::string help_text (pos->second->GetHelp());
- help_text.append (" This command takes 'raw' input (no need to quote stuff).");
+ help_text.append(" Expects 'raw' input (see 'help raw-input'.)");
m_interpreter.OutputFormattedHelpText (output_stream,
indented_command.c_str(),
"--",
class CommandObjectPlatformStatus : public CommandObjectParsed
{
public:
- CommandObjectPlatformStatus (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "platform status",
- "Display status for the currently selected platform.",
- nullptr,
- 0)
+ CommandObjectPlatformStatus(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "platform status", "Display status for the current platform.", nullptr, 0)
{
}
class CommandObjectPlatformConnect : public CommandObjectParsed
{
public:
- CommandObjectPlatformConnect (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "platform connect",
- "Connect a platform by name to be the currently selected platform.",
- "platform connect <connect-url>",
- 0)
+ CommandObjectPlatformConnect(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "platform connect",
+ "Select the current platform by providing a connection URL.",
+ "platform connect <connect-url>", 0)
{
}
class CommandObjectPlatformDisconnect : public CommandObjectParsed
{
public:
- CommandObjectPlatformDisconnect (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "platform disconnect",
- "Disconnect a platform by name to be the currently selected platform.",
- "platform disconnect",
- 0)
+ CommandObjectPlatformDisconnect(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "platform disconnect", "Disconnect from the current platform.",
+ "platform disconnect", 0)
{
}
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
- CommandObjectPlatformFile (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "platform file",
- "A set of commands to manage file access through a platform",
- "platform file [open|close|read|write] ...")
+ CommandObjectPlatformFile(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "platform file", "Commands to access files on the current platform.",
+ "platform file [open|close|read|write] ...")
{
LoadSubCommand ("open", CommandObjectSP (new CommandObjectPlatformFOpen (interpreter)));
LoadSubCommand ("close", CommandObjectSP (new CommandObjectPlatformFClose (interpreter)));
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
- CommandObjectPlatformProcess (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "platform process",
- "A set of commands to query, launch and attach to platform processes",
- "platform process [attach|launch|list] ...")
+ CommandObjectPlatformProcess(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "platform process",
+ "Commands to query, launch and attach to processes on the current platform.",
+ "platform process [attach|launch|list] ...")
{
LoadSubCommand ("attach", CommandObjectSP (new CommandObjectPlatformProcessAttach (interpreter)));
LoadSubCommand ("launch", CommandObjectSP (new CommandObjectPlatformProcessLaunch (interpreter)));
static OptionDefinition g_option_table[];
uint32_t timeout;
};
-
- CommandObjectPlatformShell (CommandInterpreter &interpreter) :
- CommandObjectRaw (interpreter,
- "platform shell",
- "Run a shell command on the selected platform.",
- "platform shell <shell-command>",
- 0),
- m_options(interpreter)
+
+ CommandObjectPlatformShell(CommandInterpreter &interpreter)
+ : CommandObjectRaw(interpreter, "platform shell", "Run a shell command on the current platform.",
+ "platform shell <shell-command>", 0),
+ m_options(interpreter)
{
}
}
};
-CommandObjectPlatform::CommandObjectPlatform(CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "platform",
- "A set of commands to manage and create platforms.",
- "platform [connect|disconnect|info|list|status|select] ...")
+CommandObjectPlatform::CommandObjectPlatform(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "platform", "Commands to manage and create platforms.",
+ "platform [connect|disconnect|info|list|status|select] ...")
{
LoadSubCommand ("select", CommandObjectSP (new CommandObjectPlatformSelect (interpreter)));
LoadSubCommand ("list" , CommandObjectSP (new CommandObjectPlatformList (interpreter)));
}
};
-CommandObjectPlugin::CommandObjectPlugin (CommandInterpreter &interpreter) :
-CommandObjectMultiword (interpreter,
- "plugin",
- "A set of commands for managing or customizing plugin commands.",
- "plugin <subcommand> [<subcommand-options>]")
+CommandObjectPlugin::CommandObjectPlugin(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "plugin", "Commands for managing LLDB plugins.",
+ "plugin <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("load", CommandObjectSP (new CommandObjectPluginLoad (interpreter)));
}
LazyBool m_keep_stopped;
};
- CommandObjectProcessDetach (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "process detach",
- "Detach from the current process being debugged.",
- "process detach",
- eCommandRequiresProcess |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched),
- m_options(interpreter)
+ CommandObjectProcessDetach(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "process detach", "Detach from the current target process.",
+ "process detach",
+ eCommandRequiresProcess | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched),
+ m_options(interpreter)
{
}
class CommandObjectProcessPlugin : public CommandObjectProxy
{
public:
- CommandObjectProcessPlugin (CommandInterpreter &interpreter) :
- CommandObjectProxy (interpreter,
- "process plugin",
- "Send a custom command to the current process plug-in.",
- "process plugin <args>",
- 0)
+ CommandObjectProcessPlugin(CommandInterpreter &interpreter)
+ : CommandObjectProxy(interpreter, "process plugin",
+ "Send a custom command to the current target process plug-in.", "process plugin <args>", 0)
{
}
class CommandObjectProcessSignal : public CommandObjectParsed
{
public:
- CommandObjectProcessSignal (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "process signal",
- "Send a UNIX signal to the current process being debugged.",
- nullptr,
- eCommandRequiresProcess | eCommandTryTargetAPILock)
+ CommandObjectProcessSignal(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "process signal", "Send a UNIX signal to the current target process.",
+ nullptr, eCommandRequiresProcess | eCommandTryTargetAPILock)
{
CommandArgumentEntry arg;
CommandArgumentData signal_arg;
class CommandObjectProcessInterrupt : public CommandObjectParsed
{
public:
- CommandObjectProcessInterrupt (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "process interrupt",
- "Interrupt the current process being debugged.",
- "process interrupt",
- eCommandRequiresProcess |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched)
+ CommandObjectProcessInterrupt(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "process interrupt", "Interrupt the current target process.",
+ "process interrupt",
+ eCommandRequiresProcess | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched)
{
}
class CommandObjectProcessKill : public CommandObjectParsed
{
public:
- CommandObjectProcessKill (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "process kill",
- "Terminate the current process being debugged.",
- "process kill",
- eCommandRequiresProcess |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched)
+ CommandObjectProcessKill(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "process kill", "Terminate the current target process.", "process kill",
+ eCommandRequiresProcess | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched)
{
}
class CommandObjectProcessStatus : public CommandObjectParsed
{
public:
- CommandObjectProcessStatus (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter,
- "process status",
- "Show the current status and location of executing process.",
- "process status",
- eCommandRequiresProcess | eCommandTryTargetAPILock)
+ CommandObjectProcessStatus(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "process status",
+ "Show status and stop location for the current target process.", "process status",
+ eCommandRequiresProcess | eCommandTryTargetAPILock)
{
}
std::string pass;
};
- CommandObjectProcessHandle (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "process handle",
- "Show or update what the process and debugger should do with various signals received from the OS.",
- nullptr),
- m_options (interpreter)
+ CommandObjectProcessHandle(CommandInterpreter &interpreter)
+ : CommandObjectParsed(
+ interpreter, "process handle",
+ "Manage LLDB handling of OS signals for the current target process. Defaults to showing current policy.",
+ nullptr),
+ m_options(interpreter)
{
SetHelpLong ("\nIf no signals are specified, update them all. If no update "
"option is specified, list the current values.");
// CommandObjectMultiwordProcess
//-------------------------------------------------------------------------
-CommandObjectMultiwordProcess::CommandObjectMultiwordProcess (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "process",
- "A set of commands for operating on a process.",
- "process <subcommand> [<subcommand-options>]")
+CommandObjectMultiwordProcess::CommandObjectMultiwordProcess(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "process", "Commands for interacting with processes on the current platform.",
+ "process <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("attach", CommandObjectSP (new CommandObjectProcessAttach (interpreter)));
LoadSubCommand ("launch", CommandObjectSP (new CommandObjectProcessLaunch (interpreter)));
// CommandObjectQuit
//-------------------------------------------------------------------------
-CommandObjectQuit::CommandObjectQuit (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter, "quit", "Quit out of the LLDB debugger.", "quit")
+CommandObjectQuit::CommandObjectQuit(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "quit", "Quit the LLDB debugger.", "quit")
{
}
//----------------------------------------------------------------------
// CommandObjectRegister constructor
//----------------------------------------------------------------------
-CommandObjectRegister::CommandObjectRegister(CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "register",
- "A set of commands to access thread registers.",
- "register [read|write] ...")
+CommandObjectRegister::CommandObjectRegister(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "register",
+ "Commands to access registers for the current thread and stack frame.",
+ "register [read|write] ...")
{
LoadSubCommand ("read", CommandObjectSP (new CommandObjectRegisterRead (interpreter)));
LoadSubCommand ("write", CommandObjectSP (new CommandObjectRegisterWrite (interpreter)));
class CommandObjectSettingsSet : public CommandObjectRaw
{
public:
- CommandObjectSettingsSet (CommandInterpreter &interpreter) :
- CommandObjectRaw(interpreter,
- "settings set",
- "Set or change the value of a single debugger setting variable.",
- nullptr),
- m_options (interpreter)
+ CommandObjectSettingsSet(CommandInterpreter &interpreter)
+ : CommandObjectRaw(interpreter, "settings set", "Set the value of the specified debugger setting.", nullptr),
+ m_options(interpreter)
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
class CommandObjectSettingsShow : public CommandObjectParsed
{
public:
- CommandObjectSettingsShow (CommandInterpreter &interpreter) :
- CommandObjectParsed(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.",
- nullptr)
+ CommandObjectSettingsShow(CommandInterpreter &interpreter)
+ : CommandObjectParsed(
+ interpreter, "settings show",
+ "Show matching debugger settings and their current values. Defaults to showing all settings.", nullptr)
{
CommandArgumentEntry arg1;
CommandArgumentData var_name_arg;
class CommandObjectSettingsList : public CommandObjectParsed
{
-public:
- CommandObjectSettingsList (CommandInterpreter &interpreter) :
- CommandObjectParsed(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).",
- nullptr)
+public:
+ CommandObjectSettingsList(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "settings list",
+ "List and describe matching debugger settings. Defaults to all listing all settings.",
+ nullptr)
{
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
class CommandObjectSettingsRemove : public CommandObjectRaw
{
public:
- CommandObjectSettingsRemove (CommandInterpreter &interpreter) :
- CommandObjectRaw(interpreter,
- "settings remove",
- "Remove the specified element from an array or dictionary settings variable.",
- nullptr)
+ CommandObjectSettingsRemove(CommandInterpreter &interpreter)
+ : CommandObjectRaw(interpreter, "settings remove",
+ "Remove a value from a setting, specified by array index or dictionary key.", nullptr)
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
class CommandObjectSettingsReplace : public CommandObjectRaw
{
public:
- CommandObjectSettingsReplace (CommandInterpreter &interpreter) :
- CommandObjectRaw(interpreter,
- "settings replace",
- "Replace the specified element from an internal debugger settings array or dictionary variable with the specified new value.",
- nullptr)
+ CommandObjectSettingsReplace(CommandInterpreter &interpreter)
+ : CommandObjectRaw(interpreter, "settings replace",
+ "Replace the debugger setting value specified by array index or dictionary key.", nullptr)
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
class CommandObjectSettingsInsertBefore : public CommandObjectRaw
{
public:
- CommandObjectSettingsInsertBefore (CommandInterpreter &interpreter) :
- CommandObjectRaw(interpreter,
- "settings insert-before",
- "Insert value(s) into an internal debugger settings array variable, immediately before the specified element.",
- nullptr)
+ CommandObjectSettingsInsertBefore(CommandInterpreter &interpreter)
+ : CommandObjectRaw(interpreter, "settings insert-before", "Insert one or more values into an debugger array "
+ "setting immediately before the specified element "
+ "index.",
+ nullptr)
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
class CommandObjectSettingsInsertAfter : public CommandObjectRaw
{
public:
- CommandObjectSettingsInsertAfter (CommandInterpreter &interpreter) :
- CommandObjectRaw(interpreter,
- "settings insert-after",
- "Insert value(s) into an internal debugger settings array variable, immediately after the specified element.",
- nullptr)
+ CommandObjectSettingsInsertAfter(CommandInterpreter &interpreter)
+ : CommandObjectRaw(
+ interpreter, "settings insert-after",
+ "Insert one or more values into a debugger array settings after the specified element index.", nullptr)
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
class CommandObjectSettingsAppend : public CommandObjectRaw
{
public:
- CommandObjectSettingsAppend (CommandInterpreter &interpreter) :
- CommandObjectRaw(interpreter,
- "settings append",
- "Append a new value to the end of an internal debugger settings array, dictionary or string variable.",
- nullptr)
+ CommandObjectSettingsAppend(CommandInterpreter &interpreter)
+ : CommandObjectRaw(interpreter, "settings append",
+ "Append one or more values to a debugger array, dictionary, or string setting.", nullptr)
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
class CommandObjectSettingsClear : public CommandObjectParsed
{
public:
- CommandObjectSettingsClear (CommandInterpreter &interpreter) :
- CommandObjectParsed(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.",
- nullptr)
+ CommandObjectSettingsClear(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "settings clear", "Clear a debugger setting array, dictionary, or string.",
+ nullptr)
{
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
// CommandObjectMultiwordSettings
//-------------------------------------------------------------------------
-CommandObjectMultiwordSettings::CommandObjectMultiwordSettings (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "settings",
- "A set of commands for manipulating internal settable debugger variables.",
- "settings <command> [<command-options>]")
+CommandObjectMultiwordSettings::CommandObjectMultiwordSettings(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "settings", "Commands for managing LLDB settings.",
+ "settings <subcommand> [<command-options>]")
{
LoadSubCommand ("set", CommandObjectSP (new CommandObjectSettingsSet (interpreter)));
LoadSubCommand ("show", CommandObjectSP (new CommandObjectSettingsShow (interpreter)));
};
public:
- CommandObjectSourceInfo (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "source info",
- "Display source line information (as specified) based "
- "on the current executable's debug info.",
- nullptr,
- eCommandRequiresTarget),
- m_options(interpreter)
+ CommandObjectSourceInfo(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "source info", "Display source line information for the current target "
+ "process. Defaults to instruction pointer in current stack "
+ "frame.",
+ nullptr, eCommandRequiresTarget),
+ m_options(interpreter)
{
}
bool show_bp_locs;
bool reverse;
};
-
-public:
- CommandObjectSourceList(CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "source list",
- "Display source code (as specified) based on the current executable's debug info.",
- nullptr,
- eCommandRequiresTarget),
- m_options (interpreter)
+
+public:
+ CommandObjectSourceList(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "source list",
+ "Display source code for the current target process as specified by options.", nullptr,
+ eCommandRequiresTarget),
+ m_options(interpreter)
{
}
// CommandObjectMultiwordSource
//-------------------------------------------------------------------------
-CommandObjectMultiwordSource::CommandObjectMultiwordSource (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "source",
- "A set of commands for accessing source file information",
- "source <subcommand> [<subcommand-options>]")
+CommandObjectMultiwordSource::CommandObjectMultiwordSource(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(
+ interpreter, "source",
+ "Commands for examining source code described by debug information for the current target process.",
+ "source <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("info", CommandObjectSP (new CommandObjectSourceInfo (interpreter)));
LoadSubCommand ("list", CommandObjectSP (new CommandObjectSourceList (interpreter)));
static const uint32_t SHORT_OPTION_SHLB = 0x73686c62; // 'shlb'
public:
- CommandObjectTargetVariable (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "target variable",
- "Read global variable(s) prior to, or while running your binary.",
- nullptr,
- eCommandRequiresTarget),
- m_option_group (interpreter),
- m_option_variable (false), // Don't include frame options
- m_option_format (eFormatDefault),
- m_option_compile_units (LLDB_OPT_SET_1, false, "file",
- SHORT_OPTION_FILE, 0, eArgTypeFilename,
- "A basename or fullpath to a file that contains global variables. This option can be specified multiple times."),
- m_option_shared_libraries (LLDB_OPT_SET_1, false, "shlib",
- SHORT_OPTION_SHLB, 0, eArgTypeFilename,
- "A basename or fullpath to a shared library to use in the search for global variables. This option can be specified multiple times."),
- m_varobj_options()
+ CommandObjectTargetVariable(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "target variable",
+ "Read global variables for the current target, before or while running a process.",
+ nullptr, eCommandRequiresTarget),
+ m_option_group(interpreter),
+ m_option_variable(false), // Don't include frame options
+ m_option_format(eFormatDefault),
+ m_option_compile_units(LLDB_OPT_SET_1, false, "file", SHORT_OPTION_FILE, 0, eArgTypeFilename,
+ "A basename or fullpath to a file that contains global variables. This option can be "
+ "specified multiple times."),
+ m_option_shared_libraries(LLDB_OPT_SET_1, false, "shlib", SHORT_OPTION_SHLB, 0, eArgTypeFilename,
+ "A basename or fullpath to a shared library to use in the search for global "
+ "variables. This option can be specified multiple times."),
+ m_varobj_options()
{
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
//------------------------------------------------------------------
CommandObjectTargetModulesDump(CommandInterpreter &interpreter)
: CommandObjectMultiword(
- interpreter, "target modules dump",
- "A set of commands for dumping information about one or more target modules.",
+ interpreter, "target modules dump", "Commands for dumping information about one or more target modules.",
"target modules dump [headers|symtab|sections|symfile|line-table] [<file1> <file2> ...]")
{
LoadSubCommand("objfile", CommandObjectSP(new CommandObjectTargetModulesDumpObjfile(interpreter)));
class CommandObjectTargetModulesImageSearchPaths : public CommandObjectMultiword
{
public:
- CommandObjectTargetModulesImageSearchPaths (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "target modules search-paths",
- "A set of commands for operating on debugger target image search paths.",
- "target modules search-paths <subcommand> [<subcommand-options>]")
+ CommandObjectTargetModulesImageSearchPaths(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "target modules search-paths",
+ "Commands for managing module search paths for a target.",
+ "target modules search-paths <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("add", CommandObjectSP (new CommandObjectTargetModulesSearchPathsAdd (interpreter)));
LoadSubCommand ("clear", CommandObjectSP (new CommandObjectTargetModulesSearchPathsClear (interpreter)));
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
- CommandObjectTargetModules(CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "target modules",
- "A set of commands for accessing information for one or more target modules.",
- "target modules <sub-command> ...")
+ CommandObjectTargetModules(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "target modules",
+ "Commands for accessing information for one or more target modules.",
+ "target modules <sub-command> ...")
{
LoadSubCommand ("add", CommandObjectSP (new CommandObjectTargetModulesAdd (interpreter)));
LoadSubCommand ("load", CommandObjectSP (new CommandObjectTargetModulesLoad (interpreter)));
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
- CommandObjectTargetSymbols(CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "target symbols",
- "A set of commands for adding and managing debug symbol files.",
- "target symbols <sub-command> ...")
+ CommandObjectTargetSymbols(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "target symbols", "Commands for adding and managing debug symbol files.",
+ "target symbols <sub-command> ...")
{
LoadSubCommand ("add", CommandObjectSP (new CommandObjectTargetSymbolsAdd (interpreter)));
}
class CommandObjectMultiwordTargetStopHooks : public CommandObjectMultiword
{
public:
- CommandObjectMultiwordTargetStopHooks (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "target stop-hook",
- "A set of commands for operating on debugger target stop-hooks.",
- "target stop-hook <subcommand> [<subcommand-options>]")
+ CommandObjectMultiwordTargetStopHooks(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "target stop-hook",
+ "Commands for operating on debugger target stop-hooks.",
+ "target stop-hook <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("add", CommandObjectSP (new CommandObjectTargetStopHookAdd (interpreter)));
LoadSubCommand ("delete", CommandObjectSP (new CommandObjectTargetStopHookDelete (interpreter)));
// CommandObjectMultiwordTarget
//-------------------------------------------------------------------------
-CommandObjectMultiwordTarget::CommandObjectMultiwordTarget (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "target",
- "A set of commands for operating on debugger targets.",
- "target <subcommand> [<subcommand-options>]")
+CommandObjectMultiwordTarget::CommandObjectMultiwordTarget(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "target", "Commands for operating on debugger targets.",
+ "target <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("create", CommandObjectSP (new CommandObjectTargetCreate (interpreter)));
LoadSubCommand ("delete", CommandObjectSP (new CommandObjectTargetDelete (interpreter)));
bool m_extended_backtrace;
};
- CommandObjectThreadBacktrace (CommandInterpreter &interpreter) :
- CommandObjectIterateOverThreads(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.",
- nullptr,
- eCommandRequiresProcess |
- eCommandRequiresThread |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused ),
- m_options(interpreter)
+ CommandObjectThreadBacktrace(CommandInterpreter &interpreter)
+ : CommandObjectIterateOverThreads(
+ interpreter, "thread backtrace", "Show thread call stacks. Defaults to the current thread, thread "
+ "indexes can be specified as arguments. Use the thread-index \"all\" "
+ "to see all threads.",
+ nullptr, eCommandRequiresProcess | eCommandRequiresThread | eCommandTryTargetAPILock |
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
+ m_options(interpreter)
{
}
class CommandObjectThreadContinue : public CommandObjectParsed
{
public:
- CommandObjectThreadContinue (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "thread continue",
- "Continue execution of one or more threads in an active process.",
- nullptr,
- eCommandRequiresThread |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused)
+ CommandObjectThreadContinue(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "thread continue", "Continue execution of the current target process. One "
+ "or more threads may be specified, by default all "
+ "threads continue.",
+ nullptr, eCommandRequiresThread | eCommandTryTargetAPILock |
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused)
{
CommandArgumentEntry arg;
CommandArgumentData thread_idx_arg;
// Instance variables to hold the values for command options.
};
- CommandObjectThreadUntil (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "thread until",
- "Run the current or specified thread until it reaches a given line number or address or leaves the current function.",
- nullptr,
- eCommandRequiresThread |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused ),
- m_options (interpreter)
+ CommandObjectThreadUntil(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "thread until", "Continue until a line number or address is reached by the "
+ "current or specified thread. Stops when returning from "
+ "the current function as a safety measure.",
+ nullptr, eCommandRequiresThread | eCommandTryTargetAPILock |
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
+ m_options(interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData line_num_arg;
class CommandObjectThreadSelect : public CommandObjectParsed
{
public:
- CommandObjectThreadSelect (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "thread select",
- "Select a thread as the currently active thread.",
- nullptr,
- eCommandRequiresProcess |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused )
+ CommandObjectThreadSelect(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "thread select", "Change the currently selected thread.", nullptr,
+ eCommandRequiresProcess | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
+ eCommandProcessMustBePaused)
{
CommandArgumentEntry arg;
CommandArgumentData thread_idx_arg;
class CommandObjectThreadList : public CommandObjectParsed
{
public:
- CommandObjectThreadList (CommandInterpreter &interpreter):
- CommandObjectParsed (interpreter,
- "thread list",
- "Show a summary of all current threads in a process.",
- "thread list",
- eCommandRequiresProcess |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused )
+ CommandObjectThreadList(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "thread list",
+ "Show a summary of each thread in the current target process.", "thread list",
+ eCommandRequiresProcess | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
+ eCommandProcessMustBePaused)
{
}
static OptionDefinition g_option_table[];
};
- CommandObjectThreadInfo (CommandInterpreter &interpreter) :
- CommandObjectIterateOverThreads (interpreter,
- "thread info",
- "Show an extended summary of information about thread(s) in a process.",
- "thread info",
- eCommandRequiresProcess |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused),
- m_options (interpreter)
+ CommandObjectThreadInfo(CommandInterpreter &interpreter)
+ : CommandObjectIterateOverThreads(
+ interpreter, "thread info",
+ "Show an extended summary of one or more threads. Defaults to the current thread.", "thread info",
+ eCommandRequiresProcess | eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
+ eCommandProcessMustBePaused),
+ m_options(interpreter)
{
m_add_return = false;
}
// Instance variables to hold the values for command options.
};
- CommandObjectThreadReturn (CommandInterpreter &interpreter) :
- CommandObjectRaw (interpreter,
- "thread return",
- "Return from the currently selected frame, short-circuiting execution of the frames below it, with an optional return value,"
- " or with the -x option from the innermost function evaluation.",
- "thread return",
- eCommandRequiresFrame |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused ),
- m_options (interpreter)
+ CommandObjectThreadReturn(CommandInterpreter &interpreter)
+ : CommandObjectRaw(interpreter, "thread return",
+ "Prematurely return from a stack frame, short-circuiting execution of newer frames "
+ "and optionally yielding a specified value. Defaults to the exiting the current stack "
+ "frame.",
+ "thread return", eCommandRequiresFrame | eCommandTryTargetAPILock |
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
+ m_options(interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData expression_arg;
bool m_internal;
};
- CommandObjectThreadPlanList (CommandInterpreter &interpreter) :
- CommandObjectIterateOverThreads(interpreter,
- "thread plan list",
- "Show thread plans for one or more threads. If no threads are specified, show the "
- "currently selected thread. Use the thread-index \"all\" to see all threads.",
- nullptr,
- eCommandRequiresProcess |
- eCommandRequiresThread |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused ),
- m_options(interpreter)
+ CommandObjectThreadPlanList(CommandInterpreter &interpreter)
+ : CommandObjectIterateOverThreads(
+ interpreter, "thread plan list",
+ "Show thread plans for one or more threads. If no threads are specified, show the "
+ "current thread. Use the thread-index \"all\" to see all threads.",
+ nullptr, eCommandRequiresProcess | eCommandRequiresThread | eCommandTryTargetAPILock |
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
+ m_options(interpreter)
{
}
class CommandObjectThreadPlanDiscard : public CommandObjectParsed
{
public:
- CommandObjectThreadPlanDiscard (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "thread plan discard",
- "Discards thread plans up to and including the plan passed as the command argument."
- "Only user visible plans can be discarded, use the index from \"thread plan list\""
- " without the \"-i\" argument.",
- nullptr,
- eCommandRequiresProcess |
- eCommandRequiresThread |
- eCommandTryTargetAPILock |
- eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused )
+ CommandObjectThreadPlanDiscard(CommandInterpreter &interpreter)
+ : CommandObjectParsed(
+ interpreter, "thread plan discard",
+ "Discards thread plans up to and including the specified index (see 'thread plan list'.) "
+ "Only user visible plans can be discarded.",
+ nullptr, eCommandRequiresProcess | eCommandRequiresThread | eCommandTryTargetAPILock |
+ eCommandProcessMustBeLaunched | eCommandProcessMustBePaused)
{
CommandArgumentEntry arg;
CommandArgumentData plan_index_arg;
class CommandObjectMultiwordThreadPlan : public CommandObjectMultiword
{
public:
- CommandObjectMultiwordThreadPlan(CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "plan",
- "A set of subcommands for accessing the thread plans controlling execution control on one or more threads.",
- "thread plan <subcommand> [<subcommand objects]")
+ CommandObjectMultiwordThreadPlan(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "plan", "Commands for managing thread plans that control execution.",
+ "thread plan <subcommand> [<subcommand objects]")
{
LoadSubCommand ("list", CommandObjectSP (new CommandObjectThreadPlanList (interpreter)));
LoadSubCommand ("discard", CommandObjectSP (new CommandObjectThreadPlanDiscard (interpreter)));
// CommandObjectMultiwordThread
//-------------------------------------------------------------------------
-CommandObjectMultiwordThread::CommandObjectMultiwordThread (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "thread",
- "A set of commands for operating on one or more threads within a running process.",
- "thread <subcommand> [<subcommand-options>]")
+CommandObjectMultiwordThread::CommandObjectMultiwordThread(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "thread",
+ "Commands for operating on one or more threads in the current process.",
+ "thread <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("backtrace", CommandObjectSP (new CommandObjectThreadBacktrace (interpreter)));
LoadSubCommand ("continue", CommandObjectSP (new CommandObjectThreadContinue (interpreter)));
LoadSubCommand ("select", CommandObjectSP (new CommandObjectThreadSelect (interpreter)));
LoadSubCommand ("until", CommandObjectSP (new CommandObjectThreadUntil (interpreter)));
LoadSubCommand ("info", CommandObjectSP (new CommandObjectThreadInfo (interpreter)));
- LoadSubCommand ("step-in", CommandObjectSP (new CommandObjectThreadStepWithTypeAndScope (
- interpreter,
- "thread step-in",
- "Source level single step in specified thread (current thread, if none specified).",
- nullptr,
- eStepTypeInto,
- eStepScopeSource)));
-
- LoadSubCommand ("step-out", CommandObjectSP (new CommandObjectThreadStepWithTypeAndScope (
- interpreter,
- "thread step-out",
- "Finish executing the function of the currently selected frame and return to its call site in specified thread (current thread, if none specified).",
- nullptr,
- eStepTypeOut,
- eStepScopeSource)));
-
- LoadSubCommand ("step-over", CommandObjectSP (new CommandObjectThreadStepWithTypeAndScope (
- interpreter,
- "thread step-over",
- "Source level single step in specified thread (current thread, if none specified), stepping over calls.",
- nullptr,
- eStepTypeOver,
- eStepScopeSource)));
-
- LoadSubCommand ("step-inst", CommandObjectSP (new CommandObjectThreadStepWithTypeAndScope (
- interpreter,
- "thread step-inst",
- "Single step one instruction in specified thread (current thread, if none specified).",
- nullptr,
- eStepTypeTrace,
- eStepScopeInstruction)));
-
- LoadSubCommand ("step-inst-over", CommandObjectSP (new CommandObjectThreadStepWithTypeAndScope (
- interpreter,
- "thread step-inst-over",
- "Single step one instruction in specified thread (current thread, if none specified), stepping over calls.",
- nullptr,
- eStepTypeTraceOver,
- eStepScopeInstruction)));
+ LoadSubCommand("step-in",
+ CommandObjectSP(new CommandObjectThreadStepWithTypeAndScope(
+ interpreter, "thread step-in",
+ "Source level single step, stepping into calls. Defaults to current thread unless specified.",
+ nullptr, eStepTypeInto, eStepScopeSource)));
+
+ LoadSubCommand("step-out",
+ CommandObjectSP(new CommandObjectThreadStepWithTypeAndScope(
+ interpreter, "thread step-out", "Finish executing the current stack frame and stop after "
+ "returning. Defaults to current thread unless specified.",
+ nullptr, eStepTypeOut, eStepScopeSource)));
+
+ LoadSubCommand("step-over",
+ CommandObjectSP(new CommandObjectThreadStepWithTypeAndScope(
+ interpreter, "thread step-over",
+ "Source level single step, stepping over calls. Defaults to current thread unless specified.",
+ nullptr, eStepTypeOver, eStepScopeSource)));
+
+ LoadSubCommand(
+ "step-inst",
+ CommandObjectSP(new CommandObjectThreadStepWithTypeAndScope(
+ interpreter, "thread step-inst",
+ "Instruction level single step, stepping into calls. Defaults to current thread unless specified.",
+ nullptr, eStepTypeTrace, eStepScopeInstruction)));
+
+ LoadSubCommand(
+ "step-inst-over",
+ CommandObjectSP(new CommandObjectThreadStepWithTypeAndScope(
+ interpreter, "thread step-inst-over",
+ "Instruction level single step, stepping over calls. Defaults to current thread unless specified.",
+ nullptr, eStepTypeTraceOver, eStepScopeInstruction)));
LoadSubCommand ("step-scripted", CommandObjectSP (new CommandObjectThreadStepWithTypeAndScope (
interpreter,
class CommandObjectTypeFormat : public CommandObjectMultiword
{
public:
- CommandObjectTypeFormat (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "type format",
- "A set of commands for editing variable value display options",
- "type format [<sub-command-options>] ")
+ CommandObjectTypeFormat(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "type format", "Commands for customizing value display formats.",
+ "type format [<sub-command-options>] ")
{
LoadSubCommand ("add", CommandObjectSP (new CommandObjectTypeFormatAdd (interpreter)));
LoadSubCommand ("clear", CommandObjectSP (new CommandObjectTypeFormatClear (interpreter)));
class CommandObjectTypeSynth : public CommandObjectMultiword
{
public:
- CommandObjectTypeSynth (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "type synthetic",
- "A set of commands for operating on synthetic type representations",
- "type synthetic [<sub-command-options>] ")
+ CommandObjectTypeSynth(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "type synthetic",
+ "Commands for operating on synthetic type representations.",
+ "type synthetic [<sub-command-options>] ")
{
LoadSubCommand ("add", CommandObjectSP (new CommandObjectTypeSynthAdd (interpreter)));
LoadSubCommand ("clear", CommandObjectSP (new CommandObjectTypeSynthClear (interpreter)));
class CommandObjectTypeFilter : public CommandObjectMultiword
{
public:
- CommandObjectTypeFilter (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "type filter",
- "A set of commands for operating on type filters",
- "type synthetic [<sub-command-options>] ")
+ CommandObjectTypeFilter(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "type filter", "Commands for operating on type filters.",
+ "type synthetic [<sub-command-options>] ")
{
LoadSubCommand ("add", CommandObjectSP (new CommandObjectTypeFilterAdd (interpreter)));
LoadSubCommand ("clear", CommandObjectSP (new CommandObjectTypeFilterClear (interpreter)));
class CommandObjectTypeCategory : public CommandObjectMultiword
{
public:
- CommandObjectTypeCategory (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "type category",
- "A set of commands for operating on categories",
- "type category [<sub-command-options>] ")
+ CommandObjectTypeCategory(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "type category", "Commands for operating on type categories.",
+ "type category [<sub-command-options>] ")
{
LoadSubCommand ("define", CommandObjectSP (new CommandObjectTypeCategoryDefine (interpreter)));
LoadSubCommand ("enable", CommandObjectSP (new CommandObjectTypeCategoryEnable (interpreter)));
class CommandObjectTypeSummary : public CommandObjectMultiword
{
public:
- CommandObjectTypeSummary (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "type summary",
- "A set of commands for editing variable summary display options",
- "type summary [<sub-command-options>] ")
+ CommandObjectTypeSummary(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "type summary", "Commands for editing variable summary display options.",
+ "type summary [<sub-command-options>] ")
{
LoadSubCommand ("add", CommandObjectSP (new CommandObjectTypeSummaryAdd (interpreter)));
LoadSubCommand ("clear", CommandObjectSP (new CommandObjectTypeSummaryClear (interpreter)));
// CommandObjectType
//-------------------------------------------------------------------------
-CommandObjectType::CommandObjectType (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "type",
- "A set of commands for operating on the type system",
- "type [<sub-command-options>]")
+CommandObjectType::CommandObjectType(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "type", "Commands for operating on the type system.",
+ "type [<sub-command-options>]")
{
LoadSubCommand ("category", CommandObjectSP (new CommandObjectTypeCategory (interpreter)));
LoadSubCommand ("filter", CommandObjectSP (new CommandObjectTypeFilter (interpreter)));
// CommandObjectVersion
//-------------------------------------------------------------------------
-CommandObjectVersion::CommandObjectVersion (CommandInterpreter &interpreter) :
- CommandObjectParsed (interpreter, "version", "Show version of LLDB debugger.", "version")
+CommandObjectVersion::CommandObjectVersion(CommandInterpreter &interpreter)
+ : CommandObjectParsed(interpreter, "version", "Show the LLDB debugger version.", "version")
{
}
class CommandObjectWatchpointSet : public CommandObjectMultiword
{
public:
- CommandObjectWatchpointSet (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "watchpoint set",
- "A set of commands for setting a watchpoint.",
- "watchpoint set <subcommand> [<subcommand-options>]")
+ CommandObjectWatchpointSet(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "watchpoint set", "Commands for setting a watchpoint.",
+ "watchpoint set <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("variable", CommandObjectSP (new CommandObjectWatchpointSetVariable (interpreter)));
//-------------------------------------------------------------------------
#pragma mark MultiwordWatchpoint
-CommandObjectMultiwordWatchpoint::CommandObjectMultiwordWatchpoint(CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "watchpoint",
- "A set of commands for operating on watchpoints.",
- "watchpoint <command> [<command-options>]")
+CommandObjectMultiwordWatchpoint::CommandObjectMultiwordWatchpoint(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "watchpoint", "Commands for operating on watchpoints.",
+ "watchpoint <subcommand> [<command-options>]")
{
CommandObjectSP list_command_object (new CommandObjectWatchpointList (interpreter));
CommandObjectSP enable_command_object (new CommandObjectWatchpointEnable (interpreter));
public IOHandlerDelegateMultiline
{
public:
- CommandObjectWatchpointCommandAdd (CommandInterpreter &interpreter) :
- CommandObjectParsed(interpreter,
- "add",
- "Add a set of commands to a watchpoint, to be executed whenever the watchpoint is hit.",
- nullptr),
- IOHandlerDelegateMultiline("DONE", IOHandlerDelegate::Completion::LLDBCommand),
- m_options (interpreter)
+ CommandObjectWatchpointCommandAdd(CommandInterpreter &interpreter)
+ : CommandObjectParsed(
+ interpreter, "add",
+ "Add a set of LLDB commands to a watchpoint, to be executed whenever the watchpoint is hit.", nullptr),
+ IOHandlerDelegateMultiline("DONE", IOHandlerDelegate::Completion::LLDBCommand),
+ m_options(interpreter)
{
SetHelpLong (
R"(
// CommandObjectWatchpointCommand
//-------------------------------------------------------------------------
-CommandObjectWatchpointCommand::CommandObjectWatchpointCommand (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "command",
- "A set of commands for adding, removing and examining bits of code to be executed when the watchpoint is hit (watchpoint 'commmands').",
- "command <sub-command> [<sub-command-options>] <watchpoint-id>")
+CommandObjectWatchpointCommand::CommandObjectWatchpointCommand(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "command", "Commands for adding, removing and examining LLDB commands "
+ "executed when the watchpoint is hit (watchpoint 'commmands').",
+ "command <sub-command> [<sub-command-options>] <watchpoint-id>")
{
CommandObjectSP add_command_object (new CommandObjectWatchpointCommandAdd (interpreter));
CommandObjectSP delete_command_object (new CommandObjectWatchpointCommandDelete (interpreter));
AddAlias ("call", cmd_obj_sp, "--")->SetHelpLong("");
if (auto po = AddAlias ("po", cmd_obj_sp, "-O --"))
{
- po->SetHelp("Evaluate an expression in the current program context, using user defined variables and variables currently in scope, and display the result of evaluation in a language-specific manner.");
+ po->SetHelp("Evaluate an expression on the current thread. Displays any returned value with formatting "
+ "controlled by the type's author.");
po->SetHelpLong("");
}
AddAlias("parray", cmd_obj_sp, "--element-count %1 --")->SetHelpLong("");
{"^[\"']?(.*[^[:space:]\"'])[\"']?[[:space:]]*$", "breakpoint set --name '%1'"}};
size_t num_regexes = llvm::array_lengthof(break_regexes);
-
- std::unique_ptr<CommandObjectRegexCommand>
- break_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-break",
- "Set a breakpoint using a regular expression to specify the location, where <linenum> is in decimal and <address> is in hex.\n",
- "\n_regexp-break <filename>:<linenum> # _regexp-break main.c:12 // Break on line 12 of main.c\n"
- "_regexp-break <linenum> # _regexp-break 12 // Break on line 12 of current file\n"
- "_regexp-break <address> # _regexp-break 0x1234000 // Break on address 0x1234000\n"
- "_regexp-break <name> # _regexp-break main // Break in 'main' after the prologue\n"
- "_regexp-break &<name> # _regexp-break &main // Break on the first instruction in 'main'\n"
- "_regexp-break <module>`<name> # _regexp-break libc.so`malloc // Break in 'malloc' only in the 'libc.so' shared library\n"
- "_regexp-break /<source-regex>/ # _regexp-break /break here/ // Break on all lines that match the regular expression 'break here' in the current file.\n",
- 2,
- CommandCompletions::eSymbolCompletion |
- CommandCompletions::eSourceFileCompletion,
- false));
+
+ std::unique_ptr<CommandObjectRegexCommand> break_regex_cmd_ap(new CommandObjectRegexCommand(
+ *this, "_regexp-break", "Set a breakpoint using one of several shorthand formats.\n",
+ "\n"
+ "_regexp-break <filename>:<linenum>\n"
+ " main.c:12 // Break at line 12 of main.c\n\n"
+ "_regexp-break <linenum>\n"
+ " 12 // Break at line 12 of current file\n\n"
+ "_regexp-break 0x<address>\n"
+ " 0x1234000 // Break at address 0x1234000\n\n"
+ "_regexp-break <name>\n"
+ " main // Break in 'main' after the prologue\n\n"
+ "_regexp-break &<name>\n"
+ " &main // Break at first instruction in 'main'\n\n"
+ "_regexp-break <module>`<name>\n"
+ " libc.so`malloc // Break in 'malloc' from 'libc.so'\n\n"
+ "_regexp-break /<source-regex>/\n"
+ " /break here/ // Break on source lines in current file\n"
+ " // containing text 'break here'.\n",
+ 2, CommandCompletions::eSymbolCompletion | CommandCompletions::eSourceFileCompletion, false));
if (break_regex_cmd_ap.get())
{
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- tbreak_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-tbreak",
- "Set a one shot breakpoint using a regular expression to specify the location, where <linenum> is in decimal and <address> is in hex.",
- "_regexp-tbreak [<filename>:<linenum>]\n_regexp-break [<linenum>]\n_regexp-break [<address>]\n_regexp-break <...>",
- 2,
- CommandCompletions::eSymbolCompletion |
- CommandCompletions::eSourceFileCompletion,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> tbreak_regex_cmd_ap(new CommandObjectRegexCommand(
+ *this, "_regexp-tbreak", "Set a one-shot breakpoint using one of several shorthand formats.\n",
+ "\n"
+ "_regexp-break <filename>:<linenum>\n"
+ " main.c:12 // Break at line 12 of main.c\n\n"
+ "_regexp-break <linenum>\n"
+ " 12 // Break at line 12 of current file\n\n"
+ "_regexp-break 0x<address>\n"
+ " 0x1234000 // Break at address 0x1234000\n\n"
+ "_regexp-break <name>\n"
+ " main // Break in 'main' after the prologue\n\n"
+ "_regexp-break &<name>\n"
+ " &main // Break at first instruction in 'main'\n\n"
+ "_regexp-break <module>`<name>\n"
+ " libc.so`malloc // Break in 'malloc' from 'libc.so'\n\n"
+ "_regexp-break /<source-regex>/\n"
+ " /break here/ // Break on source lines in current file\n"
+ " // containing text 'break here'.\n",
+ 2, CommandCompletions::eSymbolCompletion | CommandCompletions::eSourceFileCompletion, false));
if (tbreak_regex_cmd_ap.get())
{
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- attach_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-attach",
- "Attach to a process id if in decimal, otherwise treat the argument as a process name to attach to.",
- "_regexp-attach [<pid>]\n_regexp-attach [<process-name>]",
- 2,
- 0,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> attach_regex_cmd_ap(
+ new CommandObjectRegexCommand(*this, "_regexp-attach", "Attach to process by ID or name.",
+ "_regexp-attach <pid> | <process-name>", 2, 0, false));
if (attach_regex_cmd_ap.get())
{
if (attach_regex_cmd_ap->AddRegexCommand("^([0-9]+)[[:space:]]*$", "process attach --pid %1") &&
m_command_dict[attach_regex_cmd_sp->GetCommandName ()] = attach_regex_cmd_sp;
}
}
-
- std::unique_ptr<CommandObjectRegexCommand>
- down_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-down",
- "Go down \"n\" frames in the stack (1 frame by default).",
- "_regexp-down [n]",
- 2,
- 0,
- false));
+
+ std::unique_ptr<CommandObjectRegexCommand> down_regex_cmd_ap(new CommandObjectRegexCommand(
+ *this, "_regexp-down", "Select a newer stack frame. Defaults to moving one frame, a numeric argument can "
+ "specify an arbitrary number.",
+ "_regexp-down [<count>]", 2, 0, false));
if (down_regex_cmd_ap.get())
{
if (down_regex_cmd_ap->AddRegexCommand("^$", "frame select -r -1") &&
m_command_dict[down_regex_cmd_sp->GetCommandName ()] = down_regex_cmd_sp;
}
}
-
- std::unique_ptr<CommandObjectRegexCommand>
- up_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-up",
- "Go up \"n\" frames in the stack (1 frame by default).",
- "_regexp-up [n]",
- 2,
- 0,
- false));
+
+ std::unique_ptr<CommandObjectRegexCommand> up_regex_cmd_ap(
+ new CommandObjectRegexCommand(*this, "_regexp-up", "Select an older stack frame. Defaults to moving one "
+ "frame, a numeric argument can specify an arbitrary number.",
+ "_regexp-up [<count>]", 2, 0, false));
if (up_regex_cmd_ap.get())
{
if (up_regex_cmd_ap->AddRegexCommand("^$", "frame select -r 1") &&
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- display_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-display",
- "Add an expression evaluation stop-hook.",
- "_regexp-display expression",
- 2,
- 0,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> display_regex_cmd_ap(new CommandObjectRegexCommand(
+ *this, "_regexp-display", "Evaluate an expression at every stop (see 'help target stop-hook'.)",
+ "_regexp-display expression", 2, 0, false));
if (display_regex_cmd_ap.get())
{
if (display_regex_cmd_ap->AddRegexCommand("^(.+)$", "target stop-hook add -o \"expr -- %1\""))
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- undisplay_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-undisplay",
- "Remove an expression evaluation stop-hook.",
- "_regexp-undisplay stop-hook-number",
- 2,
- 0,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> undisplay_regex_cmd_ap(new CommandObjectRegexCommand(
+ *this, "_regexp-undisplay", "Stop displaying expression at every stop (specified by stop-hook index.)",
+ "_regexp-undisplay stop-hook-number", 2, 0, false));
if (undisplay_regex_cmd_ap.get())
{
if (undisplay_regex_cmd_ap->AddRegexCommand("^([0-9]+)$", "target stop-hook delete %1"))
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- connect_gdb_remote_cmd_ap(new CommandObjectRegexCommand (*this,
- "gdb-remote",
- "Connect to a remote GDB server. If no hostname is provided, localhost is assumed.",
- "gdb-remote [<hostname>:]<portnum>",
- 2,
- 0,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> connect_gdb_remote_cmd_ap(new CommandObjectRegexCommand(
+ *this, "gdb-remote",
+ "Connect to a process via remote GDB server. If no host is specifed, localhost is assumed.",
+ "gdb-remote [<hostname>:]<portnum>", 2, 0, false));
if (connect_gdb_remote_cmd_ap.get())
{
if (connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+)$", "process connect --plugin gdb-remote connect://%1") &&
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- connect_kdp_remote_cmd_ap(new CommandObjectRegexCommand (*this,
- "kdp-remote",
- "Connect to a remote KDP server. udp port 41139 is the default port number.",
- "kdp-remote <hostname>[:<portnum>]",
- 2,
- 0,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> connect_kdp_remote_cmd_ap(new CommandObjectRegexCommand(
+ *this, "kdp-remote",
+ "Connect to a process via remote KDP server. If no UDP port is specified, port 41139 is assumed.",
+ "kdp-remote <hostname>[:<portnum>]", 2, 0, false));
if (connect_kdp_remote_cmd_ap.get())
{
if (connect_kdp_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+)$", "process connect --plugin kdp-remote udp://%1") &&
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- bt_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-bt",
- "Show a backtrace. An optional argument is accepted; if that argument is a number, it specifies the number of frames to display. If that argument is 'all', full backtraces of all threads are displayed.",
- "bt [<digit>|all]",
- 2,
- 0,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> bt_regex_cmd_ap(new CommandObjectRegexCommand(
+ *this, "_regexp-bt", "Show the current thread's call stack. Any numeric argument displays at most that many "
+ "frames. The argument 'all' displays all threads.",
+ "bt [<digit> | all]", 2, 0, false));
if (bt_regex_cmd_ap.get())
{
// accept but don't document "bt -c <number>" -- before bt was a regex command if you wanted to backtrace
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- list_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-list",
- "Implements the GDB 'list' command in all of its forms except FILE:FUNCTION and maps them to the appropriate 'source list' commands.",
- "_regexp-list [<line>]\n_regexp-list [<file>:<line>]\n_regexp-list [<file>:<line>]",
- 2,
- CommandCompletions::eSourceFileCompletion,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> list_regex_cmd_ap(new CommandObjectRegexCommand(
+ *this, "_regexp-list", "List relevant source code using one of several shorthand formats.",
+ "\n"
+ "_regexp-list <file>:<line> // List around specific file/line\n"
+ "_regexp-list <line> // List current file around specified line\n"
+ "_regexp-list <function-name> // List specified function\n"
+ "_regexp-list 0x<address> // List around specified address\n"
+ "_regexp-list -[<count>] // List previous <count> lines\n"
+ "_regexp-list // List subsequent lines",
+ 2, CommandCompletions::eSourceFileCompletion, false));
if (list_regex_cmd_ap.get())
{
if (list_regex_cmd_ap->AddRegexCommand("^([0-9]+)[[:space:]]*$", "source list --line %1") &&
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- env_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-env",
- "Implements a shortcut to viewing and setting environment variables.",
- "_regexp-env\n_regexp-env FOO=BAR",
- 2,
- 0,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> env_regex_cmd_ap(
+ new CommandObjectRegexCommand(*this, "_regexp-env", "Shorthand for viewing and setting environment variables.",
+ "\n"
+ "_regexp-env // Show enrivonment\n"
+ "_regexp-env <name>=<value> // Set an environment variable",
+ 2, 0, false));
if (env_regex_cmd_ap.get())
{
if (env_regex_cmd_ap->AddRegexCommand("^$", "settings show target.env-vars") &&
}
}
- std::unique_ptr<CommandObjectRegexCommand>
- jump_regex_cmd_ap(new CommandObjectRegexCommand (*this,
- "_regexp-jump",
- "Sets the program counter to a new address.",
- "_regexp-jump [<line>]\n"
- "_regexp-jump [<+-lineoffset>]\n"
- "_regexp-jump [<file>:<line>]\n"
- "_regexp-jump [*<addr>]\n",
- 2,
- 0,
- false));
+ std::unique_ptr<CommandObjectRegexCommand> jump_regex_cmd_ap(
+ new CommandObjectRegexCommand(*this, "_regexp-jump", "Set the program counter to a new address.",
+ "\n"
+ "_regexp-jump <line>\n"
+ "_regexp-jump +<line-offset> | -<line-offset>\n"
+ "_regexp-jump <file>:<line>\n"
+ "_regexp-jump *<addr>\n",
+ 2, 0, false));
if (jump_regex_cmd_ap.get())
{
if (jump_regex_cmd_ap->AddRegexCommand("^\\*(.*)$", "thread jump --addr %1") &&
static const char *
BreakpointIDHelpTextCallback ()
{
- return "Breakpoint ID's consist major and minor numbers; the major number "
- "corresponds to the single entity that was created with a 'breakpoint set' "
- "command; the minor numbers correspond to all the locations that were actually "
- "found/set based on the major breakpoint. A full breakpoint ID might look like "
- "3.14, meaning the 14th location set for the 3rd breakpoint. You can specify "
- "all the locations of a breakpoint by just indicating the major breakpoint "
- "number. A valid breakpoint id consists either of just the major id number, "
- "or the major number, a dot, and the location number (e.g. 3 or 3.2 could "
- "both be valid breakpoint ids).";
+ return "Breakpoints are identified using major and minor numbers; the major "
+ "number corresponds to the single entity that was created with a 'breakpoint "
+ "set' command; the minor numbers correspond to all the locations that were "
+ "actually found/set based on the major breakpoint. A full breakpoint ID might "
+ "look like 3.14, meaning the 14th location set for the 3rd breakpoint. You "
+ "can specify all the locations of a breakpoint by just indicating the major "
+ "breakpoint number. A valid breakpoint ID consists either of just the major "
+ "number, or the major number followed by a dot and the location number (e.g. "
+ "3 or 3.2 could both be valid breakpoint IDs.)";
}
static const char *
BreakpointIDRangeHelpTextCallback ()
{
- 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.";
+ 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.";
}
static const char *
BreakpointNameHelpTextCallback ()
{
return "A name that can be added to a breakpoint when it is created, or later "
- "on with the \"breakpoint name add\" command. "
- "Breakpoint names can be used to specify breakpoints in all the places breakpoint ID's "
- "and breakpoint ID ranges can be used. As such they provide a convenient way to group breakpoints, "
- "and to operate on breakpoints you create without having to track the breakpoint number. "
- "Note, the attributes you set when using a breakpoint name in a breakpoint command don't "
- "adhere to the name, but instead are set individually on all the breakpoints currently tagged with that name. Future breakpoints "
- "tagged with that name will not pick up the attributes previously given using that name. "
- "In order to distinguish breakpoint names from breakpoint ID's and ranges, "
- "names must start with a letter from a-z or A-Z and cannot contain spaces, \".\" or \"-\". "
- "Also, breakpoint names can only be applied to breakpoints, not to breakpoint locations.";
+ "on with the \"breakpoint name add\" command. "
+ "Breakpoint names can be used to specify breakpoints in all the places breakpoint IDs "
+ "and breakpoint ID ranges can be used. As such they provide a convenient way to group breakpoints, "
+ "and to operate on breakpoints you create without having to track the breakpoint number. "
+ "Note, the attributes you set when using a breakpoint name in a breakpoint command don't "
+ "adhere to the name, but instead are set individually on all the breakpoints currently tagged with that "
+ "name. Future breakpoints "
+ "tagged with that name will not pick up the attributes previously given using that name. "
+ "In order to distinguish breakpoint names from breakpoint IDs and ranges, "
+ "names must start with a letter from a-z or A-Z and cannot contain spaces, \".\" or \"-\". "
+ "Also, breakpoint names can only be applied to breakpoints, not to breakpoint locations.";
}
static const char *
CommandObject::GenerateHelpText (Stream &output_strm)
{
CommandInterpreter& interpreter = GetCommandInterpreter();
- if (GetOptions() != nullptr)
+ if (WantsRawCommandString())
{
- if (WantsRawCommandString())
- {
- std::string help_text (GetHelp());
- help_text.append (" This command takes 'raw' input (no need to quote stuff).");
- interpreter.OutputFormattedHelpText (output_strm, "", "", help_text.c_str(), 1);
- }
- else
- interpreter.OutputFormattedHelpText (output_strm, "", "", GetHelp(), 1);
- output_strm.Printf ("\nSyntax: %s\n", GetSyntax());
- GetOptions()->GenerateOptionUsage (output_strm, this);
- const char *long_help = GetHelpLong();
- if ((long_help != nullptr)
- && (strlen (long_help) > 0))
- FormatLongHelpText (output_strm, long_help);
- if (!IsDashDashCommand())
- {
- if (WantsRawCommandString() && !WantsCompletion())
- {
- // Emit the message about using ' -- ' between the end of the command options and the raw input
- // conditionally, i.e., only if the command object does not want completion.
- interpreter.OutputFormattedHelpText (output_strm, "", "",
- "\nIMPORTANT NOTE: Because this command takes 'raw' input, if you use any command options"
- " you must use ' -- ' between the end of the command options and the beginning of the raw input.", 1);
- }
- else if (GetNumArgumentEntries() > 0
- && GetOptions()
- && GetOptions()->NumCommandOptions() > 0)
- {
- // Also emit a warning about using "--" in case you are using a command that takes options and arguments.
- interpreter.OutputFormattedHelpText (output_strm, "", "",
- "\nThis command takes options and free-form arguments. If your arguments resemble"
- " option specifiers (i.e., they start with a - or --), you must use ' -- ' between"
- " the end of the command options and the beginning of the arguments.", 1);
- }
- }
+ std::string help_text(GetHelp());
+ help_text.append(" Expects 'raw' input (see 'help raw-input'.)");
+ interpreter.OutputFormattedHelpText(output_strm, "", "", help_text.c_str(), 1);
}
- else if (IsMultiwordObject())
+ else
+ interpreter.OutputFormattedHelpText(output_strm, "", "", GetHelp(), 1);
+ output_strm.Printf("\nSyntax: %s\n", GetSyntax());
+ Options *options = GetOptions();
+ if (options != nullptr)
{
- if (WantsRawCommandString())
- {
- std::string help_text (GetHelp());
- help_text.append (" This command takes 'raw' input (no need to quote stuff).");
- interpreter.OutputFormattedHelpText (output_strm, "", "", help_text.c_str(), 1);
- }
- else
- interpreter.OutputFormattedHelpText (output_strm, "", "", GetHelp(), 1);
- GenerateHelpText (output_strm);
+ options->GenerateOptionUsage(output_strm, this);
}
- else
+ const char *long_help = GetHelpLong();
+ if ((long_help != nullptr) && (strlen(long_help) > 0))
{
- const char *long_help = GetHelpLong();
- if ((long_help != nullptr)
- && (strlen (long_help) > 0))
- FormatLongHelpText (output_strm, long_help);
- else if (WantsRawCommandString())
+ FormatLongHelpText(output_strm, long_help);
+ }
+ if (!IsDashDashCommand() && options && options->NumCommandOptions() > 0)
+ {
+ if (WantsRawCommandString() && !WantsCompletion())
{
- std::string help_text (GetHelp());
- help_text.append (" This command takes 'raw' input (no need to quote stuff).");
- interpreter.OutputFormattedHelpText (output_strm, "", "", help_text.c_str(), 1);
+ // Emit the message about using ' -- ' between the end of the command options and the raw input
+ // conditionally, i.e., only if the command object does not want completion.
+ interpreter.OutputFormattedHelpText(
+ output_strm, "", "",
+ "\nImportant Note: Because this command takes 'raw' input, if you use any command options"
+ " you must use ' -- ' between the end of the command options and the beginning of the raw input.",
+ 1);
+ }
+ else if (GetNumArgumentEntries() > 0)
+ {
+ // Also emit a warning about using "--" in case you are using a command that takes options and arguments.
+ interpreter.OutputFormattedHelpText(
+ output_strm, "", "", "\nThis command takes options and free-form arguments. If your arguments resemble"
+ " option specifiers (i.e., they start with a - or --), you must use ' -- ' between"
+ " the end of the command options and the beginning of the arguments.",
+ 1);
}
- else
- interpreter.OutputFormattedHelpText (output_strm, "", "", GetHelp(), 1);
- output_strm.Printf ("\nSyntax: %s\n", GetSyntax());
}
}
return g_archs_help.GetData();
}
-CommandObject::ArgumentTableEntry
-CommandObject::g_arguments_data[] =
-{
+CommandObject::ArgumentTableEntry CommandObject::g_arguments_data[] = {
+ // clang-format off
{ eArgTypeAddress, "address", CommandCompletions::eNoCompletion, { nullptr, false }, "A valid address in the target program's execution space." },
{ eArgTypeAddressOrExpression, "address-expression", CommandCompletions::eNoCompletion, { nullptr, false }, "An expression that resolves to an address." },
{ eArgTypeAliasName, "alias-name", CommandCompletions::eNoCompletion, { nullptr, false }, "The name of an abbreviation (alias) for a debugger command." },
{ eArgTypeRunMode, "run-mode", CommandCompletions::eNoCompletion, { nullptr, false }, "Help text goes here." },
{ eArgTypeScriptedCommandSynchronicity, "script-cmd-synchronicity", CommandCompletions::eNoCompletion, { nullptr, false }, "The synchronicity to use to run scripted commands with regard to LLDB event system." },
{ eArgTypeScriptLang, "script-language", CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language to be used for script-based commands. Currently only Python is valid." },
- { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, { nullptr, false }, "The word for which you wish to search for information about." },
+ { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, { nullptr, false }, "Any word of interest for search purposes." },
{ eArgTypeSelector, "selector", CommandCompletions::eNoCompletion, { nullptr, false }, "An Objective-C selector name." },
{ eArgTypeSettingIndex, "setting-index", CommandCompletions::eNoCompletion, { nullptr, false }, "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, { nullptr, false }, "A key into a settings variables that is a dictionary (try 'settings list' to see all the possible settings variables and their types)." },
{ eArgTypePlatform, "platform-name", CommandCompletions::ePlatformPluginCompletion, { nullptr, false }, "The name of an installed platform plug-in . Type 'platform list' to see a complete list of installed platforms." },
{ eArgTypeWatchpointID, "watchpt-id", CommandCompletions::eNoCompletion, { nullptr, false }, "Watchpoint IDs are positive integers." },
{ eArgTypeWatchpointIDRange, "watchpt-id-list", CommandCompletions::eNoCompletion, { nullptr, false }, "For example, '1-3' or '1 to 3'." },
- { eArgTypeWatchType, "watch-type", CommandCompletions::eNoCompletion, { nullptr, false }, "Specify the type for a watchpoint." }
+ { eArgTypeWatchType, "watch-type", CommandCompletions::eNoCompletion, { nullptr, false }, "Specify the type for a watchpoint." },
+ { eArgRawInput, "raw-input", CommandCompletions::eNoCompletion, { nullptr, false }, "Free-form text passed to a command without prior interpretation, allowing spaces without requiring quotes. To pass arguments and free form text put two dashes ' -- ' between the last argument and any raw input." }
+ // clang-format on
};
const CommandObject::ArgumentTableEntry*
// CommandObjectScript
//-------------------------------------------------------------------------
-CommandObjectScript::CommandObjectScript (CommandInterpreter &interpreter, ScriptLanguage script_lang) :
- CommandObjectRaw (interpreter,
- "script",
- "Pass an expression to the script interpreter for evaluation and return the results. Drop into the interactive interpreter if no expression is given.",
- "script [<script-expression-for-evaluation>]")
+CommandObjectScript::CommandObjectScript(CommandInterpreter &interpreter, ScriptLanguage script_lang)
+ : CommandObjectRaw(interpreter, "script", "Invoke the script interpreter with provided code and display any "
+ "results. Start the interactive interpreter if no code is supplied.",
+ "script [<script-code>]")
{
}
class CommandObjectMultiwordItaniumABI : public CommandObjectMultiword
{
public:
- CommandObjectMultiwordItaniumABI (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "cplusplus",
- "A set of commands for operating on the C++ Language Runtime.",
- "cplusplus <subcommand> [<subcommand-options>]")
+ CommandObjectMultiwordItaniumABI(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "cplusplus", "Commands for operating on the C++ language runtime.",
+ "cplusplus <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("demangle", CommandObjectSP (new CommandObjectMultiwordItaniumABI_Demangle (interpreter)));
}
class CommandObjectMultiwordObjC_ClassTable : public CommandObjectMultiword
{
public:
- CommandObjectMultiwordObjC_ClassTable (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "class-table",
- "A set of commands for operating on the Objective-C class table.",
- "class-table <subcommand> [<subcommand-options>]")
+ CommandObjectMultiwordObjC_ClassTable(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "class-table", "Commands for operating on the Objective-C class table.",
+ "class-table <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("dump", CommandObjectSP (new CommandObjectObjC_ClassTable_Dump (interpreter)));
}
class CommandObjectMultiwordObjC_TaggedPointer : public CommandObjectMultiword
{
public:
-
- CommandObjectMultiwordObjC_TaggedPointer (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "tagged-pointer",
- "A set of commands for operating on Objective-C tagged pointers.",
- "class-table <subcommand> [<subcommand-options>]")
+ CommandObjectMultiwordObjC_TaggedPointer(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "tagged-pointer",
+ "Commands for operating on Objective-C tagged pointers.",
+ "class-table <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("info", CommandObjectSP (new CommandObjectMultiwordObjC_TaggedPointer_Info (interpreter)));
}
class CommandObjectMultiwordObjC : public CommandObjectMultiword
{
public:
- CommandObjectMultiwordObjC (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "objc",
- "A set of commands for operating on the Objective-C Language Runtime.",
- "objc <subcommand> [<subcommand-options>]")
+ CommandObjectMultiwordObjC(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "objc", "Commands for operating on the Objective-C language runtime.",
+ "objc <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("class-table", CommandObjectSP (new CommandObjectMultiwordObjC_ClassTable (interpreter)));
LoadSubCommand ("tagged-pointer", CommandObjectSP (new CommandObjectMultiwordObjC_TaggedPointer (interpreter)));
{
public:
CommandObjectRenderScriptRuntimeModule(CommandInterpreter &interpreter)
- : CommandObjectMultiword(interpreter, "renderscript module", "Commands that deal with renderscript modules.",
+ : CommandObjectMultiword(interpreter, "renderscript module", "Commands that deal with RenderScript modules.",
nullptr)
{
LoadSubCommand("dump", CommandObjectSP(new CommandObjectRenderScriptRuntimeModuleDump(interpreter)));
{
public:
CommandObjectRenderScriptRuntimeKernel(CommandInterpreter &interpreter)
- : CommandObjectMultiword(interpreter, "renderscript kernel", "Commands that deal with renderscript kernels.",
+ : CommandObjectMultiword(interpreter, "renderscript kernel", "Commands that deal with RenderScript kernels.",
nullptr)
{
LoadSubCommand("list", CommandObjectSP(new CommandObjectRenderScriptRuntimeKernelList(interpreter)));
{
public:
CommandObjectRenderScriptRuntimeContext(CommandInterpreter &interpreter)
- : CommandObjectMultiword(interpreter, "renderscript context", "Commands that deal with renderscript contexts.",
+ : CommandObjectMultiword(interpreter, "renderscript context", "Commands that deal with RenderScript contexts.",
nullptr)
{
LoadSubCommand("dump", CommandObjectSP(new CommandObjectRenderScriptRuntimeContextDump(interpreter)));
public:
CommandObjectRenderScriptRuntimeAllocation(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "renderscript allocation",
- "Commands that deal with renderscript allocations.", nullptr)
+ "Commands that deal with RenderScript allocations.", nullptr)
{
LoadSubCommand("list", CommandObjectSP(new CommandObjectRenderScriptRuntimeAllocationList(interpreter)));
LoadSubCommand("dump", CommandObjectSP(new CommandObjectRenderScriptRuntimeAllocationDump(interpreter)));
{
public:
CommandObjectRenderScriptRuntimeStatus(CommandInterpreter &interpreter)
- : CommandObjectParsed(interpreter, "renderscript status", "Displays current renderscript runtime status.",
+ : CommandObjectParsed(interpreter, "renderscript status", "Displays current RenderScript runtime status.",
"renderscript status", eCommandRequiresProcess | eCommandProcessMustBeLaunched)
{
}
{
public:
CommandObjectRenderScriptRuntime(CommandInterpreter &interpreter)
- : CommandObjectMultiword(interpreter, "renderscript", "A set of commands for operating on renderscript.",
+ : CommandObjectMultiword(interpreter, "renderscript", "Commands for operating on the RenderScript runtime.",
"renderscript <subcommand> [<subcommand-options>]")
{
LoadSubCommand("module", CommandObjectSP(new CommandObjectRenderScriptRuntimeModule(interpreter)));
class CommandObjectMultiwordProcessKDP : public CommandObjectMultiword
{
public:
- CommandObjectMultiwordProcessKDP (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "process plugin",
- "A set of commands for operating on a ProcessKDP process.",
- "process plugin <subcommand> [<subcommand-options>]")
+ CommandObjectMultiwordProcessKDP(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "process plugin", "Commands for operating on a ProcessKDP process.",
+ "process plugin <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("packet", CommandObjectSP (new CommandObjectProcessKDPPacket (interpreter)));
}
class CommandObjectMultiwordProcessGDBRemote : public CommandObjectMultiword
{
public:
- CommandObjectMultiwordProcessGDBRemote (CommandInterpreter &interpreter) :
- CommandObjectMultiword (interpreter,
- "process plugin",
- "A set of commands for operating on a ProcessGDBRemote process.",
- "process plugin <subcommand> [<subcommand-options>]")
+ CommandObjectMultiwordProcessGDBRemote(CommandInterpreter &interpreter)
+ : CommandObjectMultiword(interpreter, "process plugin", "Commands for operating on a ProcessGDBRemote process.",
+ "process plugin <subcommand> [<subcommand-options>]")
{
LoadSubCommand ("packet", CommandObjectSP (new CommandObjectProcessGDBRemotePacket (interpreter)));
}
s->Address(m_start_address, sizeof (addr_t));
if (m_backstop_bkpt_id != LLDB_INVALID_BREAK_ID)
{
- s->Printf (" with backstop breakpoint id: %d at address: ", m_backstop_bkpt_id);
+ s->Printf(" with backstop breakpoint ID: %d at address: ", m_backstop_bkpt_id);
s->Address (m_backstop_addr, sizeof (addr_t));
}
else