Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA/dwarf2] Fix PR/2018 - set array type names
@ 2006-10-06 19:23 Joel Brobecker
  2006-10-06 19:28 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2006-10-06 19:23 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

Hello,

Here is a fix for GDB PR/2018.

I actually submitted this patch a long time ago (Oct 2005!), and for
some reason let it sit unnoticed. I think I was trying to win the
oldest patch unreviewed prize :-).

        http://www.sourceware.org/ml/gdb-patches/2005-10/msg00086.html

In any case, I should have sent a ping much earlier than this. Here is
a freshened-up version of the patch, and retested to make sure it still
fixes the 4 KFAILs in gdb.ada/arrayidx.exp.

2006-10-06 Joel Brobecker  <brobecker@adacore.com>

        * dwarf2read.c (read_array_type): Set the type name if the name
        attribute is present.

Tested on x86-linux, fixes the 4 KFAILs of gdb.ada/arrayidx.exp, no
regression.  OK to commit?

Thanks,
-- 
Joel

[-- Attachment #2: dwarf2read.c.diff --]
[-- Type: text/plain, Size: 594 bytes --]

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.203
diff -u -p -r1.203 dwarf2read.c
--- dwarf2read.c	18 Aug 2006 13:26:31 -0000	1.203
+++ dwarf2read.c	6 Oct 2006 18:38:48 -0000
@@ -4282,6 +4282,10 @@ read_array_type (struct die_info *die, s
   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. */

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-06 20:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-06 19:23 [RFA/dwarf2] Fix PR/2018 - set array type names Joel Brobecker
2006-10-06 19:28 ` Daniel Jacobowitz
2006-10-06 20:39   ` Joel Brobecker
2006-10-06 20:49     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox