This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug symtab/20899] New: "dwarf2_string_attr" does not check for "DW_FORM_GNU_str_index"


https://sourceware.org/bugzilla/show_bug.cgi?id=20899

            Bug ID: 20899
           Summary: "dwarf2_string_attr" does not check for
                    "DW_FORM_GNU_str_index"
           Product: gdb
           Version: 7.12.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: leszek at swirski dot co.uk
  Target Milestone: ---

The dwarf2_string_attr does not currently allow DW_FORM_GNU_str_index as a form
for string types. This manifests as null strings in the namespace_name lookup
(replaced with "(anonymous namespace)") when debugging Fission-compiled code
(personally observed when compiling v8).

The following patch adds it to the conditions:

 gdb/dwarf2read.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 924b417..f532f5c 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -17169,7 +17169,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_string
-         || attr->form == DW_FORM_GNU_strp_alt)
+         || attr->form == DW_FORM_GNU_str_index
+         || attr->form == DW_FORM_GNU_strp_alt)
        str = DW_STRING (attr);
       else
         complaint (&symfile_complaints,

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]