MCPcopy Create free account
hub / github.com/HexHive/NASS / context_stack

Method context_stack

tools/gef.py:7301–7318  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7299 return
7300
7301 def context_stack(self) -> None:
7302 self.context_title("stack")
7303
7304 show_raw = self["show_stack_raw"]
7305 nb_lines = self["nb_lines_stack"]
7306
7307 try:
7308 sp = gef.arch.sp
7309 if show_raw is True:
7310 mem = gef.memory.read(sp, 0x10 * nb_lines)
7311 gef_print(hexdump(mem, base=sp))
7312 else:
7313 gdb.execute(f"dereference -l {nb_lines:d} {sp:#x}")
7314
7315 except gdb.MemoryError:
7316 err("Cannot read memory from $SP (corrupted stack pointer?)")
7317
7318 return
7319
7320 def addr_has_breakpoint(self, address: int, bp_locations: List[str]) -> bool:
7321 return any(hex(address) in b for b in bp_locations)

Callers

nothing calls this directly

Calls 5

context_titleMethod · 0.95
gef_printFunction · 0.85
hexdumpFunction · 0.85
errFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected