Skip to content

Commit

Permalink
fixed base gdb version
Browse files Browse the repository at this point in the history
  • Loading branch information
hugsy committed Jan 19, 2024
1 parent a760eda commit 6759be8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -10528,7 +10528,7 @@ def parse_procfs_maps() -> Generator[Section, None, None]:
def parse_gdb_info_proc_maps() -> Generator[Section, None, None]:
"""Get the memory mapping from GDB's command `maintenance info sections` (limited info)."""

if GDB_VERSION < (10, 0):
if GDB_VERSION < (11, 0):
raise AttributeError("Disregarding old format")

lines = (gdb.execute("info proc mappings", to_string=True) or "").splitlines()
Expand Down
4 changes: 2 additions & 2 deletions tests/api/gef_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_api_gef_memory_only_running(self):
assert gef.memory.maps is not None

def test_api_gef_memory_parse_info_proc_maps_expected_format(self):
if self.gdb_version < (10, 0):
if self.gdb_version < (11, 0):
pytest.skip(f"Skipping test for version {self.gdb_version} (min 10.0)")

gdb, root = self._gdb, self._conn.root
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_api_gef_memory_parse_info_proc_maps(self):

Section = root.eval("Section")

if self.gdb_version < (10, 0):
if self.gdb_version < (11, 0):
# expect an exception
with pytest.raises(AttributeError):
next(gef.memory.parse_gdb_info_proc_maps())
Expand Down

0 comments on commit 6759be8

Please sign in to comment.