summaryrefslogtreecommitdiff
path: root/libdw/dwarf_formudata.c
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2018-03-14 22:45:56 +0100
committerMark Wielaard <mark@klomp.org>2018-04-03 13:13:07 +0200
commit9535e6bdba62052c59f2c89007a1a40f3f2334ec (patch)
treeaaab05582e243bf3dcba436a1ee9ce0354af12c8 /libdw/dwarf_formudata.c
parent4a97eb02bb0bcd6562f8777596e3bbad0045d7a4 (diff)
downloadelfutils-9535e6bdba62052c59f2c89007a1a40f3f2334ec.tar.gz
libdw: Add support for reading DW_FORM_strx[1234] in .debug_str_offsets.
Recognize the new .debug_str_offsets section. The CU will now hold a new str_off_base offset in that section for that CU. dwarf_form_string will decode DW_FORM_strx[1234] and return strings using that str_off_base from the .debug_addr. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libdw/dwarf_formudata.c')
-rw-r--r--libdw/dwarf_formudata.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libdw/dwarf_formudata.c b/libdw/dwarf_formudata.c
index 5d5fc635..0aaea245 100644
--- a/libdw/dwarf_formudata.c
+++ b/libdw/dwarf_formudata.c
@@ -190,6 +190,14 @@ dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval)
return -1;
break;
+ case DW_AT_str_offsets_base:
+ /* stroffsetsptr */
+ if (__libdw_formptr (attr, IDX_debug_str_offsets,
+ DWARF_E_NO_STR_OFFSETS, NULL,
+ return_uval) == NULL)
+ return -1;
+ break;
+
default:
/* sec_offset can only be used by one of the above attrs. */
if (attr->form == DW_FORM_sec_offset)