* dwarf2read.c (read_array_type): Set the type name if the name
authorJoel Brobecker <brobecker@gnat.com>
Fri, 6 Oct 2006 20:42:02 +0000 (20:42 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 6 Oct 2006 20:42:02 +0000 (20:42 +0000)
        attribute is present.

gdb/ChangeLog
gdb/dwarf2read.c

index f5697bce3cf01b235cc8b6ed576cef815943416a..eba4f8e7948bafd8fa18308dbf074d91af8941f7 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-06 Joel Brobecker  <brobecker@adacore.com>
+
+       * dwarf2read.c (read_array_type): Set the type name if the name
+       attribute is present.
+
 2006-10-05  Joel Brobecker  <brobecker@adacore.com>
 
         * blockframe.c (block_innermost_frame): Rewrite frame search logic.
index a56a5c2392b51724ac22cc45bff61c6280e0edcd..381585ff73e920399621bd5189d44b9b009f14a2 100644 (file)
@@ -4282,6 +4282,10 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
   if (attr)
     TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR;
 
+  attr = dwarf2_attr (die, DW_AT_name, cu);
+  if (attr && DW_STRING (attr))
+    TYPE_NAME (type) = DW_STRING (attr);
+  
   do_cleanups (back_to);
 
   /* Install the type in the die. */