]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix dwarf2_string_attr for -gsplit-dwarf
authorLeszek Swirski <leszeks@google.com>
Thu, 26 Oct 2017 23:19:33 +0000 (19:19 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Thu, 26 Oct 2017 23:21:52 +0000 (19:21 -0400)
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.

(cherry picked from commits 16eb6b2db49e6cf2fdca56efd37689fcc170cd37 and
b33404388e5bbd8a1fddfde73cd4593ae2b557e8)

gdb/ChangeLog:

PR symtab/20899
* dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_str_index.

gdb/ChangeLog
gdb/dwarf2read.c

index b77435ce7a385d2a683ca6388e099ac9365fac61..bfa2359a35b992c389da2290b5f468812f345aa1 100644 (file)
@@ -1,3 +1,7 @@
+2017-10-25  Leszek Swirski  <leszeks@google.com>
+
+       * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_str_index.
+
 2017-10-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
 
        * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add backslash 
index 8503e6171ce09158c9f584e0546a22aba9890e96..93ec5877870281f5fd980f521963dbb33787c961 100644 (file)
@@ -17577,7 +17577,9 @@ 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
+         || attr->form == DW_FORM_GNU_str_index
+         || attr->form == DW_FORM_GNU_strp_alt)
        str = DW_STRING (attr);
       else
         complaint (&symfile_complaints,