Fix for CU version check in LocationListsPair (#439)
[pyelftools.git] / 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):