Skip to content

strings ¤

Functionality for resolving ASCII printable strings within the debuggee's address space.

Functions:

  • update_length

    Unfortunately there's not a better way to get at this info.

  • get

    Returns a printable C-string from address.

  • yield_in_page

    Yields strings of length >= n found in a given vmmap page

Attributes:

length module-attribute ¤

length = 15

update_length ¤

update_length() -> None

Unfortunately there's not a better way to get at this info.

gdb.execute('show print elements', from_tty=False, to_string=True) 'Limit on string chars or array elements to print is 21.\n'

get ¤

get(
    address: int, maxlen: int | None = None, maxread: int | None = None
) -> str | None

Returns a printable C-string from address.

Returns None if string contains non-printable chars or if the maxlen length data does not end up with a null byte.

yield_in_page ¤

yield_in_page(page: Page, n=4) -> Iterator[str]

Yields strings of length >= n found in a given vmmap page