Fix dwarf2_string_attr for -gsplit-dwarf
authorLeszek Swirski <leszeks@google.com>
Mon, 7 Aug 2017 14:40:38 +0000 (16:40 +0200)
committerSimon Marchi <simon.marchi@ericsson.com>
Mon, 7 Aug 2017 14:40:46 +0000 (16:40 +0200)
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.

gdb/ChangeLog
gdb/dwarf2read.c

index f6440858115573f03b61c1f331ce6b6fa6ca2df3..affff94ab2c53bed2496f7676070a93b07a28c70 100644 (file)
@@ -1,3 +1,7 @@
+2017-08-07  Leszek Swirski  <leszeks@google.com>
+
+       * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
+
 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
 
        * remote-sim.c (gdbsim_load): Remove char **argv local variable.
index fae3b62089d5fb0f05f78d89441253837cfbfc18..2a527e897cd1eb0fdfcae7f2e8249a336bd9e1f0 100644 (file)
@@ -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,
This page took 0.040699 seconds and 4 git commands to generate.