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.
16 lines
350 B
Python
16 lines
350 B
Python
from __future__ import annotations
|
|
|
|
import gdb
|
|
|
|
import tests
|
|
|
|
REFERENCE_BINARY = tests.binaries.get("reference-binary.out")
|
|
|
|
|
|
def test_function_base(start_binary):
|
|
start_binary(REFERENCE_BINARY)
|
|
|
|
result = gdb.execute('p/x $base("reference-binary")', to_string=True).strip()
|
|
|
|
assert result.startswith("$1 = 0x") and result.endswith("000")
|