Fix for CU version check in LocationListsPair (#439)
authorSeva Alekseyev <sevaa@yarxi.ru>
Mon, 22 Aug 2022 12:41:49 +0000 (08:41 -0400)
committerGitHub <noreply@github.com>
Mon, 22 Aug 2022 12:41:49 +0000 (05:41 -0700)
elftools/dwarf/locationlists.py

index d27b48581cf109ddbcc59f396aada995d914927c..243834fee0ab89024637e0ae0d18e8b30f0c00bc 100644 (file)
@@ -46,7 +46,7 @@ class LocationListsPair(object):
         """
         if die is None:
             raise DWARFError("For this binary, \"die\" needs to be provided")
-        section = self._loclists if die.cu.version >= 5 else self._loc
+        section = self._loclists if die.cu.header.version >= 5 else self._loc
         return section.get_location_list_at_offset(offset, die)
 
     def iter_location_lists(self):