Skip to content

config ¤

Dynamic configuration system for pwndbg, using GDB's built-in Parameter mechanism.

To create a new pwndbg configuration point, call pwndbg.config.add_param.

Parameters should be declared in the module in which they are primarily used, or in this module for general-purpose parameters.

All pwndbg Parameter types are accessible via property access on this module, for example:

>>> pwndbg.config.add_param('example-value', 7, 'an example')
>>> int(pwndbg.config.example_value)
7

Classes:

Functions:

Attributes:

CLASS_MAPPING module-attribute ¤

CLASS_MAPPING = {
    PARAM_BOOLEAN: PARAM_BOOLEAN,
    PARAM_AUTO_BOOLEAN: PARAM_AUTO_BOOLEAN,
    PARAM_ZINTEGER: PARAM_ZINTEGER,
    PARAM_STRING: PARAM_STRING,
    PARAM_ZUINTEGER: PARAM_ZUINTEGER,
    PARAM_ENUM: PARAM_ENUM,
    PARAM_OPTIONAL_FILENAME: PARAM_OPTIONAL_FILENAME,
    PARAM_ZUINTEGER_UNLIMITED: PARAM_ZUINTEGER_UNLIMITED,
    PARAM_INTEGER: PARAM_INTEGER,
    PARAM_UINTEGER: PARAM_UINTEGER,
}

Parameter ¤

Parameter(param: Parameter)

Bases: Parameter

Methods:

Attributes:

set_doc instance-attribute ¤

set_doc = 'Set ' + set_show_doc + '.'

show_doc instance-attribute ¤

show_doc = 'Show ' + set_show_doc + '.'

__doc__ instance-attribute ¤

__doc__ = help_docstring or None

param instance-attribute ¤

param = param

value instance-attribute ¤

value = value

native_value property ¤

native_value

native_default property ¤

native_default

init_super ¤

init_super(param: Parameter) -> None

Initializes the super class for GDB >= 9

on_change ¤

on_change(value: Any) -> None

Called when the value of the pwndbg.lib.config.Parameter changes Transfer the value to the GDB parameter to keep them in sync.

get_set_string ¤

get_set_string() -> str

Handles the GDB set <param>

get_show_string ¤

get_show_string(svalue: str) -> str

Handles the GDB show <param>

init_params ¤

init_params() -> None