Skip to content

Memory

ColorFunction = Callable[[str], str] module-attribute

c = ColorConfig('memory', [ColorParamSpec('stack', 'yellow', 'color for stack memory'), ColorParamSpec('heap', 'blue', 'color for heap memory'), ColorParamSpec('code', 'red', 'color for executable memory'), ColorParamSpec('data', 'purple', 'color for all other writable memory'), ColorParamSpec('rodata', 'normal', 'color for all read only memory'), ColorParamSpec('wx', 'underline', 'color added to all WX memory'), ColorParamSpec('guard', 'cyan', 'color added to all guard pages (no perms)')]) module-attribute

attempt_colorized_symbol(address)

Convert address to colorized symbol (if symbol is there), else None

get(address, text=None, prefix=None)

Returns a colorized string representing the provided address.

Parameters:

Name Type Description Default
address(int | pwndbg.dbg_mod.Value

Address to look up

required
text(str | None

Optional text to use in place of the address in the return value string.

required
prefix(str | None

Optional text to set at beginning in the return value string.

required

get_address_and_symbol(address)

Convert and colorize address 0x7ffff7fcecd0 to string 0x7ffff7fcecd0 (_dl_fini) If no symbol exists for the address, return colorized address

get_address_or_symbol(address)

Convert and colorize address to symbol if it can be resolved, else return colorized address

legend()

sym_name(address)

Retrieves the name of the symbol at the given address, if it exists