This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix dwarf2_string_attr for -gsplit-dwarf
- From: "Leszek Swirski via gdb-patches" <gdb-patches at sourceware dot org>
- To: gdb-patches at sourceware dot org
- Cc: Leszek Swirski <leszeks at google dot com>
- Date: Tue, 1 Aug 2017 10:20:30 +0100
- Subject: [PATCH] Fix dwarf2_string_attr for -gsplit-dwarf
- Authentication-results: sourceware.org; auth=none
- Reply-to: Leszek Swirski <leszeks at google dot com>
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/doc/ChangeLog:
* dwarf2read.c: Fix dwarf2_string_attr to allow
DW_FORM_GNU_str_index
---
gdb/dwarf2read.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 2c2ecda7fc..f5bed09116 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,
--
2.14.0.rc0.400.g1c36432dff-goog