mirror of
https://github.com/hugsy/gef.git
synced 2026-10-12 02:15:57 +00:00
## 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
23 lines
687 B
Python
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)
|