Skip to content

Commit

Permalink
Skip all BaseAddressEntry objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltfish committed Apr 28, 2023
1 parent e43b80b commit 8e9f513
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cle/backends/elf/elf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from elftools.dwarf.die import DIE
from elftools.dwarf.dwarf_expr import DWARFExprParser
from elftools.dwarf.dwarfinfo import DWARFInfo
from elftools.dwarf.ranges import RangeEntry
from elftools.elf import dynamic, elffile, enums, sections
from sortedcontainers import SortedDict

Expand Down Expand Up @@ -758,7 +759,7 @@ def _load_ranges_from_die(die: DIE, range_lists) -> List[Tuple[int, int]]:
ranges_offset = die.attributes["DW_AT_ranges"].value
ranges = range_lists.get_range_list_at_offset(ranges_offset)

return [(r.begin_offset, r.end_offset) for r in ranges]
return [(r.begin_offset, r.end_offset) for r in ranges if isinstance(r, RangeEntry)]

def _load_dies(self, dwarf: DWARFInfo):
"""
Expand Down

0 comments on commit 8e9f513

Please sign in to comment.