aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorLeszek Swirski <leszeks@google.com>2017-08-07 16:40:38 +0200
committerSimon Marchi <simon.marchi@ericsson.com>2017-08-07 16:40:46 +0200
commit16eb6b2db49e6cf2fdca56efd37689fcc170cd37 (patch)
treec5647ff6fb8f8bf89f979475290f4632da351421 /gdb/dwarf2read.c
parentbab55c0522f47e692e367bfa341f4e19495cd8ad (diff)
downloadgdb-16eb6b2db49e6cf2fdca56efd37689fcc170cd37.zip
gdb-16eb6b2db49e6cf2fdca56efd37689fcc170cd37.tar.gz
gdb-16eb6b2db49e6cf2fdca56efd37689fcc170cd37.tar.bz2
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.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index fae3b62..2a527e8 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,