Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA/dwarf2] Fix PR/2018 - set array type names
Date: Fri, 06 Oct 2006 19:23:00 -0000	[thread overview]
Message-ID: <20061006192303.GA1095@adacore.com> (raw)

[-- 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. */

             reply	other threads:[~2006-10-06 19:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06 19:23 Joel Brobecker [this message]
2006-10-06 19:28 ` Daniel Jacobowitz
2006-10-06 20:39   ` Joel Brobecker
2006-10-06 20:49     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061006192303.GA1095@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox