Skip to content

telescope ¤

Prints out pointer chains starting at some address in memory.

Generally used to print out the stack or register values.

Functions:

Attributes:

telescope_lines module-attribute ¤

telescope_lines = add_param(
    "telescope-lines", 8, "number of lines to printed by the telescope command"
)

skip_repeating_values module-attribute ¤

skip_repeating_values = add_param(
    "telescope-skip-repeating-val",
    True,
    "whether to skip repeating values of the telescope command",
)

skip_repeating_values_minimum module-attribute ¤

skip_repeating_values_minimum = add_param(
    "telescope-skip-repeating-val-min",
    3,
    "minimum amount of repeated values before skipping lines",
)

pad_leading_zeroes module-attribute ¤

pad_leading_zeroes = add_param(
    "telescope-pad-leading-zeroes",
    False,
    "align all integers to pointer-width by front-padding them with zeroes",
)

print_framepointer_offset module-attribute ¤

print_framepointer_offset = add_param(
    "telescope-framepointer-offset",
    True,
    "print offset to framepointer for each address, if sufficiently small",
)

print_retaddr_in_frame module-attribute ¤

print_retaddr_in_frame = add_param(
    "telescope-frame-print-retaddr",
    True,
    "print one pointer past the stack frame",
)

dont_skip_registers module-attribute ¤

dont_skip_registers = add_param(
    "telescope-dont-skip-registers",
    True,
    "don't skip a repeated line if a registers points to it",
)

offset_separator module-attribute ¤

offset_separator = add_param(
    "telescope-offset-separator",
    "│",
    "offset separator of the telescope command",
)

offset_delimiter module-attribute ¤

offset_delimiter = add_param(
    "telescope-offset-delimiter",
    ":",
    "offset delimiter of the telescope command",
)

repeating_marker module-attribute ¤

repeating_marker = add_param(
    "telescope-repeating-marker",
    "... ↓",
    "repeating values marker of the telescope command",
)

parser module-attribute ¤

parser = ArgumentParser(
    description="Dereferences on stack data, printing the entire stack frame with specified count and offset ."
)

telescope ¤

telescope(
    address: int | None = None,
    count: int = int(telescope_lines),
    to_string: bool = False,
    reverse: bool = False,
    frame: bool = False,
    inverse: bool = False,
    repeat: bool = False,
)

Recursively dereferences pointers starting at the specified address ($sp by default)

If either of telescope.repeat (set by the command invocation logic when the user re-runs the command) or repeat (set only by functions which use telescope() like an API (like context) (which they probably shouldn't)) is set, telescope() will continue from the last printed address (see also #3900).

regs_or_frame_offset ¤

regs_or_frame_offset(
    addr: int, bp: int | None, regs: dict[int, str], longest_regs: int
) -> str

stack ¤

stack(count, offset, frame, inverse) -> None

stackf ¤

stackf(count, offset) -> None