summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf_formstring.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2018-05-08 15:34:03 +0200
committerMark Wielaard <[email protected]>2018-05-11 17:27:00 +0200
commitaf1438086468f936dfb041daed59a3367fe24a07 (patch)
tree554faa8bbdfd721a9368a94ba377be223eca2a39 /libdw/dwarf_formstring.c
parent982b6fe9e31683607d476d7f90d1b56cbb78aa21 (diff)
libdw: Handle DW_FORM_[ref|strp]_sup[48] as DW_FORM_GNU_[ref|strp]_alt.
Although we don't yet handle DWARF5 supplemental files, they are like mostly like GNU alt files. This way using any of the supplemental files will at least generate an appropriate error message. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libdw/dwarf_formstring.c')
-rw-r--r--libdw/dwarf_formstring.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libdw/dwarf_formstring.c b/libdw/dwarf_formstring.c
index e7396a79..c55c7f04 100644
--- a/libdw/dwarf_formstring.c
+++ b/libdw/dwarf_formstring.c
@@ -48,7 +48,8 @@ dwarf_formstring (Dwarf_Attribute *attrp)
Dwarf_CU *cu = attrp->cu;
Dwarf *dbg = cu->dbg;
- Dwarf *dbg_ret = (attrp->form == DW_FORM_GNU_strp_alt
+ Dwarf *dbg_ret = ((attrp->form == DW_FORM_GNU_strp_alt
+ || attrp->form == DW_FORM_strp_sup)
? INTUSE(dwarf_getalt) (dbg) : dbg);
if (unlikely (dbg_ret == NULL))
@@ -70,7 +71,8 @@ dwarf_formstring (Dwarf_Attribute *attrp)
uint64_t off;
if (attrp->form == DW_FORM_strp
- || attrp->form == DW_FORM_GNU_strp_alt)
+ || attrp->form == DW_FORM_GNU_strp_alt
+ || attrp->form == DW_FORM_strp_sup)
{
if (__libdw_read_offset (dbg, dbg_ret, cu_sec_idx (cu),
attrp->valp, cu->offset_size, &off,