Skip to content

Commit

Permalink
Add a test for parsing offsets in `gef.memory.parse_gdb_info_proc_map…
Browse files Browse the repository at this point in the history
…s()`
  • Loading branch information
mjklbhvg committed May 1, 2024
1 parent b72049c commit 46dbc3b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/api/gef_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,15 @@ def test_api_gef_memory_parse_info_proc_maps(self):
next(root.eval("gef.memory.parse_gdb_info_proc_maps()") )

else:
for section in root.eval("gef.memory.parse_gdb_info_proc_maps()"):
sections = list(root.eval("gef.memory.parse_gdb_info_proc_maps()"))
for section in sections:
assert isinstance(section, Section)

expected_offsets = [0, 0x1000, 0x2000, 0x2000, 0x3000]
for section, expected_offset in zip(sections[:5], expected_offsets):
assert section.offset == expected_offset


def test_func_parse_permissions(self):
root = self._conn.root
expected_values = [
Expand Down

0 comments on commit 46dbc3b

Please sign in to comment.