summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2018-04-06 18:53:34 +0200
committerMark Wielaard <[email protected]>2018-05-28 14:51:26 +0200
commit879f3a4f99dfc7f3678dc1c959e66784f21886bb (patch)
tree06e9556b14ba7a3753afa344679119348676b983 /src
parentbc1f86b0c4fd9d00f184e759be5dbab1a15be934 (diff)
libdw: Handle .debug_rnglists in dwarf_ranges.
Handle all new DW_RLE opcodes in .debug_rnglists in dwarf_ranges. Extract code for reading .debug_addr indexes from dwarf_formaddr as __libdw_addrx to reuse in __libdw_read_begin_end_pair_inc. And add new testcase for "plain" DWARF5 and add a new test all-dwarf-ranges to test split DWARF5. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/readelf.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d28d89af..4772448c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -6,7 +6,8 @@
(listptr_cu): New function.
(print_debug_rnglists_section): Likewise.
(attr_callback): Call notice_listptr for DW_AT_ranges. Handle
- DW_AT_rnglists_base.
+ DW_AT_rnglists_base. Handle DW_FORM_rnglistx. DW_AT_start_scope
+ can also have a rnglist.
(print_debug_units): Do (silently) scan split DWARF also for
debug_ranges before DWARF5 to catch all rangelistptrs.
(print_debug): Recognize .debug_rnglists. Reset known_rnglistptr.
diff --git a/src/readelf.c b/src/readelf.c
index ce0ecc24..e7a9605c 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -6699,6 +6699,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
break;
case DW_FORM_sec_offset:
+ case DW_FORM_rnglistx:
case DW_FORM_implicit_const:
case DW_FORM_udata:
case DW_FORM_sdata:
@@ -6755,6 +6756,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
return DWARF_CB_OK;
case DW_AT_ranges:
+ case DW_AT_start_scope:
{
bool nlpt;
if (cbargs->cu->version < 5)