mirror of https://github.com/pwndbg/pwndbg.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
484 B
Python
22 lines
484 B
Python
from __future__ import annotations
|
|
|
|
import gdb
|
|
|
|
import pwndbg.aglib.memory
|
|
import pwndbg.aglib.stack
|
|
|
|
from . import get_binary
|
|
|
|
REFERENCE_BINARY = get_binary("reference-binary.out")
|
|
|
|
|
|
def test_callstack_readable(start_binary):
|
|
start_binary(REFERENCE_BINARY)
|
|
gdb.execute("b break_here")
|
|
gdb.execute("r")
|
|
|
|
addresses = pwndbg.aglib.stack.callstack()
|
|
|
|
assert len(addresses) > 0
|
|
assert all(pwndbg.aglib.memory.is_readable_address(address) for address in addresses)
|