Skip to content

init

EXECUTION_CONTROLLER = LLDBExecutionController() module-attribute

LLDB_VERSION: Tuple[int, int] = None module-attribute

T = TypeVar('T') module-attribute

LLDB

Bases: Debugger

controllers: List[Tuple[LLDBProcess, Coroutine[Any, Any, None]]] instance-attribute

event_handlers: Dict[pwndbg.dbg_mod.EventType, List[Callable[..., T]]] instance-attribute

exec_states: List[lldb.SBExecutionState] instance-attribute

prompt_hook: Callable[[], None] instance-attribute

suspended_events: Dict[pwndbg.dbg_mod.EventType, bool] instance-attribute

add_command(command_name, handler, doc)

addrsz(address)

commands()

event_handler(ty)

get_cmd_window_size()

has_event_type(ty)

history(last=10)

is_gdblib_available()

lex_args(command_line)

resume_events(ty)

selected_frame()

selected_inferior()

selected_thread()

set_python_diagnostics(enabled)

set_sysroot(sysroot)

setup(*args, **kwargs)

string_limit()

supports_breakpoint_creation_during_stop_handler()

suspend_events(ty)

x86_disassembly_flavor()

LLDBArch

Bases: Arch

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

name: str property

ptrsize: int property

__init__(name, ptrsize, endian)

LLDBCommand

Bases: CommandHandle

command_name = command_name instance-attribute

handler_name = handler_name instance-attribute

__init__(handler_name, command_name)

LLDBExecutionController

Bases: ExecutionController

cont(target)

single_step()

LLDBFrame

Bases: Frame

inner: lldb.SBFrame = inner instance-attribute

proc: LLDBProcess = proc instance-attribute

__eq__(rhs)

__init__(inner, proc)

child()

evaluate_expression(expression, lock_scheduler=False)

lookup_symbol(name, *, type=pwndbg.dbg_mod.SymbolLookupType.ANY)

parent()

pc()

reg_write(name, val)

regs()

sal()

sp()

LLDBMemoryMap

Bases: MemoryMap

pages = pages instance-attribute

__init__(pages)

is_qemu()

ranges()

LLDBProcess

Bases: Process

dbg = dbg instance-attribute

process = process instance-attribute

target = target instance-attribute

__init__(dbg, process, target, is_gdb_remote)

alive()

arch()

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

create_value(value, type=None)

dispatch_execution_controller(procedure)

download_remote_file(remote_path, local_path)

evaluate_expression(expression)

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

find_largest_range_len(min_search, max_search, test)

Finds the largest memory range given a minimum and a maximum value for the size of the rage. This is a binary search, so it should do on the order of log2(max_search - min_search) attempts before it arrives at an answer.

is_dynamically_linked()

is_linux()

is_remote()

lookup_symbol(name, *, prefer_static=False, type=pwndbg.dbg_mod.SymbolLookupType.ANY, objfile_endswith=None)

main_module_entry()

main_module_name()

module_section_locations()

pid()

read_memory(address, size, partial=False)

send_monitor(cmd)

send_remote(packet)

stopped_with_signal()

symbol_name_at_address(address)

threads()

types_with_name(name)

vmmap()

write_memory(address, data, partial=False)

LLDBRegisters

Bases: Registers

groups: lldb.SBValueList = groups instance-attribute

proc: LLDBProcess = proc instance-attribute

__init__(groups, proc)

by_name(name)

LLDBStopPoint

Bases: StopPoint

inner: lldb.SBBreakpoint | lldb.SBWatchpoint = inner instance-attribute

proc: LLDBProcess = proc instance-attribute

stop_handler_name: str | None = stop_handler_name instance-attribute

__init__(inner, proc, stop_handler_name)

remove()

set_enabled(enabled)

LLDBThread

Bases: Thread

inner: lldb.SBThread = inner instance-attribute

proc: LLDBProcess = proc instance-attribute

__init__(inner, proc)

bottom_frame()

index()

ptid()

LLDBType

Bases: Type

alignof: int property

code: pwndbg.dbg_mod.TypeCode property

inner: lldb.SBType = inner instance-attribute

name_identifier: str | None property

name_to_human_readable: str property

sizeof: int property

__eq__(rhs)

__init__(inner)

array(count)

fields()

func_arguments()

pointer()

strip_typedefs()

target()

LLDBValue

Bases: Value

address: pwndbg.dbg_mod.Value | None property

inner = inner instance-attribute

is_optimized_out: bool property

proc = proc instance-attribute

type: pwndbg.dbg_mod.Type property

__add__(rhs)

__getitem__(key)

__init__(inner, proc)

__int__()

__sub__(rhs)

cast(type)

dereference()

fetch_lazy()

string()

value_to_human_readable()

OneShotAwaitable

Used as part of the logic for the execution controller. This is an Awaitable object that yields the value passed to its constructor exactly once.

value = value instance-attribute

__await__()

__init__(value)

YieldContinue

Continues execution of the process until the breakpoint or watchpoint given in the constructor is hit or the operation is cancelled.

This class is part of the execution controller system, so it is intented to be yielded by the async function with access to an execution controller, and caught and hanlded by the event loop in the LLDB Pwndbg CLI.

target: LLDBStopPoint = target instance-attribute

__init__(target)

YieldSingleStep

Moves execution of the process being debugged forward by one instruction.

This class is part of the execution controller system, so it is intented to be yielded by the async function with access to an execution controller, and caught and hanlded by the event loop in the LLDB Pwndbg CLI.

map_type_code(type)

Determines the type code of a given LLDB SBType.

rename_register(name, proc)

Some register names differ between Pwndbg/GDB and LLDB. This function takes in a register name in the Pwndbg/GDB convention and returns the equivalent LLDB name for the register.