summaryrefslogtreecommitdiff
path: root/libdw/dwarf_end.c
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2018-04-07 23:48:27 +0200
committerMark Wielaard <mark@klomp.org>2018-05-30 00:16:15 +0200
commit4dc31fde711c69fed6acfe18e7e57dfd5665cebb (patch)
tree1f8cac4d4e3a2da4314cf37410dd94cd418d47d8 /libdw/dwarf_end.c
parent7cfe2c16f9ddaa7478a2d97dd893c6b89080020a (diff)
downloadelfutils-4dc31fde711c69fed6acfe18e7e57dfd5665cebb.tar.gz
libdw: Handle .debug_loclists in dwarf_getlocation.
Handle all new DW_LLE opcodes in .debug_loclists in dwarf_getlocation. __libdw_read_begin_end_pair_inc now also handles a default location (which is simply the range [0,-1]). Since expression blocks can now also come from the .debug_loclists section add a new fake_loclists_cu necessary for checking bounds while parsing expression blocks. Adapt varlocs test to handle debug-only files. Test testfileranges5.debug and testfilesplitranges5.debug with it. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libdw/dwarf_end.c')
-rw-r--r--libdw/dwarf_end.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c
index 19546741..23a50a0b 100644
--- a/libdw/dwarf_end.c
+++ b/libdw/dwarf_end.c
@@ -113,6 +113,11 @@ dwarf_end (Dwarf *dwarf)
cu_free (dwarf->fake_loc_cu);
free (dwarf->fake_loc_cu);
}
+ if (dwarf->fake_loclists_cu != NULL)
+ {
+ cu_free (dwarf->fake_loclists_cu);
+ free (dwarf->fake_loclists_cu);
+ }
if (dwarf->fake_addr_cu != NULL)
{
cu_free (dwarf->fake_addr_cu);