From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21611 invoked by alias); 6 Oct 2006 19:23:16 -0000 Received: (qmail 21601 invoked by uid 22791); 6 Oct 2006 19:23:15 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 06 Oct 2006 19:23:08 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 693AB48CDE5 for ; Fri, 6 Oct 2006 15:23:04 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03081-01-10 for ; Fri, 6 Oct 2006 15:23:04 -0400 (EDT) Received: from takamaka.act-europe.fr (unknown [70.71.0.212]) by nile.gnat.com (Postfix) with ESMTP id F3D9648CBD6 for ; Fri, 6 Oct 2006 15:23:03 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 45AEB47F00; Fri, 6 Oct 2006 12:23:03 -0700 (PDT) Date: Fri, 06 Oct 2006 19:23:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: [RFA/dwarf2] Fix PR/2018 - set array type names Message-ID: <20061006192303.GA1095@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline User-Agent: Mutt/1.4i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00064.txt.bz2 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 739 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 * 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 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="dwarf2read.c.diff" Content-length: 594 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. */ --ReaqsoxgOBHFXBhH--