Files
gef/tests/commands/hexdump.py
T
crazy hugsy 90cced847b [Maintenance] Remove unmaintained commands, tests, and documentation, and moved to Ruff (#1222)
## Description

This PR  
 - removes unmaintained `shellcode` commands, tests, and documentation
- (finally) switches to Ruff instead of Pylint (still handled by
`pre-commit`)
 - fixes a few ruff/ty-found issues
2026-05-02 12:15:26 -07:00

23 lines
687 B
Python

"""
`hexdump` command test module
"""
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import ERROR_INACTIVE_SESSION_MESSAGE
class HexdumpCommand(RemoteGefUnitTestGeneric):
"""`hexdump` command test module"""
def test_cmd_hexdump(self):
gdb = self._gdb
self.assertEqual(
ERROR_INACTIVE_SESSION_MESSAGE, gdb.execute("hexdump $pc", to_string=True)
)
gdb.execute("start")
gdb.execute("hexdump qword $pc", to_string=True)
gdb.execute("hexdump dword $pc -s 1", to_string=True)
gdb.execute("hexdump word $pc -s 5 -r", to_string=True)
gdb.execute("hexdump byte $sp -s 32", to_string=True)