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:

Text Only
1
2
3
>>> pwndbg.config.add_param('example-value', 7, 'an example')
>>> int(pwndbg.config.example_value)
7

CLASS_MAPPING = {pwndbg.lib.config.PARAM_BOOLEAN: gdb.PARAM_BOOLEAN, pwndbg.lib.config.PARAM_AUTO_BOOLEAN: gdb.PARAM_AUTO_BOOLEAN, pwndbg.lib.config.PARAM_ZINTEGER: gdb.PARAM_ZINTEGER, pwndbg.lib.config.PARAM_STRING: gdb.PARAM_STRING, pwndbg.lib.config.PARAM_ZUINTEGER: gdb.PARAM_ZUINTEGER, pwndbg.lib.config.PARAM_ENUM: gdb.PARAM_ENUM, pwndbg.lib.config.PARAM_OPTIONAL_FILENAME: gdb.PARAM_OPTIONAL_FILENAME, pwndbg.lib.config.PARAM_ZUINTEGER_UNLIMITED: gdb.PARAM_ZUINTEGER_UNLIMITED, pwndbg.lib.config.PARAM_INTEGER: gdb.PARAM_INTEGER, pwndbg.lib.config.PARAM_UINTEGER: gdb.PARAM_UINTEGER} module-attribute

Parameter

Bases: Parameter

__doc__ = param.help_docstring or None instance-attribute

native_default property

native_value property

param = param instance-attribute

set_doc = 'Set ' + param.set_show_doc + '.' instance-attribute

show_doc = 'Show ' + param.set_show_doc + '.' instance-attribute

value = param.value instance-attribute

__init__(param)

get_set_string()

Handles the GDB set <param>

get_show_string(svalue)

Handles the GDB show <param>

init_super(param)

Initializes the super class for GDB >= 9

init_params()