From: Leszek Swirski Date: Mon, 7 Aug 2017 14:40:38 +0000 (+0200) Subject: Fix dwarf2_string_attr for -gsplit-dwarf X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16eb6b2db49e6cf2fdca56efd37689fcc170cd37;p=binutils-gdb.git Fix dwarf2_string_attr for -gsplit-dwarf The dwarf2_string_attr did not allow DW_FORM_GNU_str_index as a form for string types. This manifested as null strings in the namespace_name lookup (replaced with "(anonymous namespace)") when debugging Fission-compiled code. gdb/ChangeLog: * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f6440858115..affff94ab2c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-08-07 Leszek Swirski + + * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt. + 2017-08-07 Simon Marchi * remote-sim.c (gdbsim_load): Remove char **argv local variable. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index fae3b62089d..2a527e897cd 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -17623,7 +17623,8 @@ dwarf2_string_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *c if (attr != NULL) { if (attr->form == DW_FORM_strp || attr->form == DW_FORM_line_strp - || attr->form == DW_FORM_string || attr->form == DW_FORM_GNU_strp_alt) + || attr->form == DW_FORM_string || DW_FORM_GNU_str_index + || attr->form == DW_FORM_GNU_strp_alt) str = DW_STRING (attr); else complaint (&symfile_complaints,