Skip to content

Gdb

BPWP_DEFERRED_DELETE: Set[GDBStopPoint] = set() module-attribute

BPWP_DEFERRED_DISABLE: Set[GDBStopPoint] = set() module-attribute

BPWP_DEFERRED_ENABLE: Set[GDBStopPoint] = set() module-attribute

T = TypeVar('T') module-attribute

BreakpointAdapter

Bases: Breakpoint

stop_handler: Callable[[], bool] instance-attribute

stop()

GDB

Bases: Debugger

add_command(name, handler, doc)

addrsz(address)

commands()

event_handler(ty)

get_cmd_window_size()

Get the size of the command window in TUI mode which could be different than the terminal window width with horizontal split "tui new-layout hsrc { -horizontal src 1 cmd 1 } 1".

Possible output of "info win" in TUI mode: (gdb) info win Name Lines Columns Focus src 77 104 (has focus) cmd 77 105

Output of "info win" in non-TUI mode: (gdb) info win The TUI is not active.

has_event_type(ty)

history(last=10)

is_gdblib_available()

lex_args(command_line)

selected_frame()

selected_inferior()

selected_thread()

set_python_diagnostics(enabled)

set_sysroot(sysroot)

setup()

string_limit()

supports_breakpoint_creation_during_stop_handler()

x86_disassembly_flavor()

GDBCommand

Bases: Command

__doc__ = doc instance-attribute

debugger = debugger instance-attribute

handler = handler instance-attribute

__init__(debugger, name, handler, doc)

invoke(args, from_tty)

GDBCommandHandle

Bases: CommandHandle

command = command instance-attribute

__init__(command)

remove()

GDBFrame

Bases: Frame

inner = inner instance-attribute

__eq__(rhs)

__init__(inner)

child()

evaluate_expression(expression, lock_scheduler=False)

parent()

pc()

reg_write(name, val)

regs()

sal()

sp()

GDBLibArch

Bases: Arch

endian: Literal['little', 'big'] property

name: str property

ptrsize: int property

GDBMemoryMap

Bases: MemoryMap

pages = pages instance-attribute

qemu = qemu instance-attribute

reliable_perms = reliable_perms instance-attribute

__init__(reliable_perms, qemu, pages)

has_reliable_perms()

is_qemu()

ranges()

GDBProcess

Bases: Process

in_bpwp_stop_handler: bool = False instance-attribute

inner = inner instance-attribute

__init__(inner)

alive()

arch()

break_at(location, stop_handler=None, one_shot=False, internal=False)

create_value(value, type=None)

disasm(address)

download_remote_file(remote_path, local_path)

evaluate_expression(expression)

find_in_memory(pattern, start, size, align, max_matches=-1, step=-1)

is_dynamically_linked()

is_linux()

is_remote()

main_module_entry()

main_module_name()

module_section_locations()

pid()

read_memory(address, size, partial=False)

send_monitor(cmd)

send_remote(packet)

symbol_address_from_name(name, prefer_static=False)

symbol_name_at_address(address)

threads()

types_with_name(name)

vmmap()

write_memory(address, data, partial=False)

GDBRegisters

Bases: Registers

frame = frame instance-attribute

__init__(frame)

by_name(name)

GDBStopPoint

Bases: StopPoint

inner: gdb.Breakpoint = inner instance-attribute

inner_stop: Callable[[], bool] | None = None instance-attribute

proc: GDBProcess = proc instance-attribute

__init__(inner, proc)

remove()

set_enabled(enabled)

GDBThread

Bases: Thread

inner = inner instance-attribute

__init__(inner)

bottom_frame()

index()

ptid()

GDBType

Bases: Type

CODE_MAPPING = {gdb.TYPE_CODE_INT: pwndbg.dbg_mod.TypeCode.INT, gdb.TYPE_CODE_UNION: pwndbg.dbg_mod.TypeCode.UNION, gdb.TYPE_CODE_STRUCT: pwndbg.dbg_mod.TypeCode.STRUCT, gdb.TYPE_CODE_ENUM: pwndbg.dbg_mod.TypeCode.ENUM, gdb.TYPE_CODE_TYPEDEF: pwndbg.dbg_mod.TypeCode.TYPEDEF, gdb.TYPE_CODE_PTR: pwndbg.dbg_mod.TypeCode.POINTER, gdb.TYPE_CODE_ARRAY: pwndbg.dbg_mod.TypeCode.ARRAY} class-attribute instance-attribute

alignof: int property

code: pwndbg.dbg_mod.TypeCode property

inner = inner instance-attribute

sizeof: int property

__init__(inner)

array(count)

fields()

has_field(name)

keys()

pointer()

strip_typedefs()

target()

GDBValue

Bases: Value

address: pwndbg.dbg_mod.Value | None property

inner = inner instance-attribute

is_optimized_out: bool property

type: pwndbg.dbg_mod.Type property

__add__(rhs)

__getitem__(key)

__init__(inner)

__int__()

__repr__()

__str__()

__sub__(rhs)

cast(type)

dereference()

fetch_lazy()

string()

parse_and_eval(expression, global_context)

Same as gdb.parse_and_eval, but only uses global_context if it is supported by the current version of GDB.

global_context was introduced in GDB 14.