memory ¤
Functions:
-
get_address_and_symbol–Convert and colorize address 0x7ffff7fcecd0 to string
0x7ffff7fcecd0 (_dl_fini) -
get_address_or_symbol–Convert and colorize address to symbol if it can be resolved, else return colorized address
-
attempt_colorized_symbol–Convert address to colorized symbol (if symbol is there), else None
-
get–Returns a colorized string representing the provided address.
-
legend–
Attributes:
-
ColorFunction– -
c–
c 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)"
),
],
)
get_address_and_symbol ¤
get_address_and_symbol(
address: int,
decompiler_stack_variables: dict[int, str],
respect_ptrwidth: bool = False,
) -> str
Convert and colorize address 0x7ffff7fcecd0 to string 0x7ffff7fcecd0 (_dl_fini) If no symbol exists for the address, return colorized address.
Parameters:
-
respect_ptrwidth(bool, default:False) –Align value to pointer width, i.e. would output
0x00007ffff7fcecd0 (_dl_fini).
get_address_or_symbol ¤
Convert and colorize address to symbol if it can be resolved, else return colorized address
attempt_colorized_symbol ¤
Convert address to colorized symbol (if symbol is there), else None
get ¤
get(
address: int | Value | Any,
text: str | None = None,
prefix: str | None = None,
page: Page | None = None,
respect_ptrwidth: bool = False,
) -> str
Returns a colorized string representing the provided address.
Parameters:
-
address(int | Value | Any) –Address to look up
-
text(str | None, default:None) –Optional text to use in place of the address in the return value string.
-
prefix(str | None, default:None) –Optional text to set at beginning in the return value string, followed by a space, without modifiying the original text.
-
respect_ptrwidth(bool, default:False) –Pad value with leading zeroes so that it is pointer-sized.