From 7e53b5a1a98377328bf37008bd53aa9d19c2d24d Mon Sep 17 00:00:00 2001 From: Seva Alekseyev Date: Mon, 22 Aug 2022 08:41:49 -0400 Subject: [PATCH] Fix for CU version check in LocationListsPair (#439) --- elftools/dwarf/locationlists.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elftools/dwarf/locationlists.py b/elftools/dwarf/locationlists.py index d27b485..243834f 100644 --- a/elftools/dwarf/locationlists.py +++ b/elftools/dwarf/locationlists.py @@ -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): -- 2.30.2