ScriptedCommand#
- class lldb.plugins.scripted_command.ScriptedCommand(debugger: SBDebugger)#
The base class for a scripted (raw) command.
A raw command receives the unparsed argument string exactly as the user typed it, and is responsible for any parsing it needs. For a command with a table-driven option/argument parser, see
ParsedCommandinstead. Register it withcommand script add -c <ClassName> ....Most of the base class methods are
@abstractmethodthat need to be overwritten by the inheriting class.Methods Summary
__call__(debugger, args, exe_ctx, result)Execute the command.
Command flags (a bitmask of
lldb.eCommandRequires*/lldb.eCommandProcessMustBe*etc.) controlling when this command is available.The full help text shown by
help.get_repeat_command(command)Customize what runs when the user presses Enter to repeat this command.
A one-line description shown by
help.Methods Documentation
- abstract __call__(debugger: SBDebugger, args: str, exe_ctx: SBExecutionContext, result: SBCommandReturnObject) None#
Execute the command.
- Parameters:
debugger (lldb.SBDebugger) – The debugger the command runs against.
args (str) – The raw, unparsed argument string.
exe_ctx (lldb.SBExecutionContext) – The execution context.
result (lldb.SBCommandReturnObject) – Write command output/errors here.
- get_flags() int#
Command flags (a bitmask of
lldb.eCommandRequires*/lldb.eCommandProcessMustBe*etc.) controlling when this command is available.- Returns:
The flags bitmask. Defaults to 0 (no restrictions).
- Return type:
int
- get_long_help() str | None#
The full help text shown by
help.- Returns:
The long help string.
- Return type:
str
- get_repeat_command(command: str) str | None#
Customize what runs when the user presses Enter to repeat this command.
- Parameters:
command (str) – The command line that was run.
- Returns:
The command line to run on repeat. Defaults to
None, meaning repeat the original command unmodified.- Return type:
str
- get_short_help() str | None#
A one-line description shown by
help.- Returns:
The short help string.
- Return type:
str