From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9499 invoked by alias); 5 Mar 2010 22:12:32 -0000 Received: (qmail 9488 invoked by uid 22791); 5 Mar 2010 22:12:30 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Mar 2010 22:12:24 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o25MCMx8007229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 5 Mar 2010 17:12:22 -0500 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o25MCJLJ000890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Mar 2010 17:12:21 -0500 Message-ID: <4B9181C3.40005@redhat.com> Date: Fri, 05 Mar 2010 22:12:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc11 Lightning/1.0b1 Thunderbird/3.0.1 MIME-Version: 1.0 To: tromey@redhat.com CC: gdb-patches@sourceware.org Subject: Re: [RFA] dwarf2_physname FINAL References: <4B903926.7070303@redhat.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------030507040908070903060509" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00247.txt.bz2 This is a multi-part message in MIME format. --------------030507040908070903060509 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1275 On 03/05/2010 01:53 PM, Tom Tromey wrote: > Keith> One other issue that I uncovered: DW_AT_MIPS_linkage_name appears to > Keith> be necessary for Ada. I have a patch that I used to address this (for > Keith> one of our internal releases), but it is probably not complete. [In > Keith> other words: it's now just as broken as it was before.] I can submit > Keith> this as a follow-up, if so desired. > > By this, I assume you mean that after your patch, Ada continues to work, > but still uses DW_AT_MIPS_linkage_name; and that you have a follow-on > patch that is incomplete but which attempts to remove the reliance on > DW_AT_MIPS_linkage_name? The patch simply keeps/uses MIPS_linkage_name for Ada. Almost nothing else is changed. I've attached it. With this patch, Ada tests now fail as much as they did before. I'm guessing there is a lot more to do, though. It is incomplete in the fact that I did not spend much time with it, and this patch is quite hacky. If we want to incorporate something like this, I'll need to play with it a bit first. Probably want to try to move this from dwarf2_name to dwarf2_physname, if that's even possible. [DW_AT_name and DW_AT_MIPS_linkage_name don't appear to be related in any way in the test cases I've seen.] Keith --------------030507040908070903060509 Content-Type: text/plain; name="ada-linkage-name.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ada-linkage-name.patch" Content-length: 1137 *** a/gdb/dwarf2read.c.orig 2010-02-19 17:36:48.000000000 -0500 --- b/gdb/dwarf2read.c 2010-02-19 17:37:37.000000000 -0500 *************** read_partial_die (struct partial_die_inf *** 7366,7371 **** --- 7366,7375 ---- break; } break; + case DW_AT_MIPS_linkage_name: + if (cu->language == language_ada) + part_die->name = DW_STRING (&attr); + break; case DW_AT_comp_dir: if (part_die->dirname == NULL) part_die->dirname = DW_STRING (&attr); *************** dwarf2_canonicalize_name (char *name, st *** 9928,9936 **** static char * dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) { ! struct attribute *attr; ! attr = dwarf2_attr (die, DW_AT_name, cu); if (!attr || !DW_STRING (attr)) return NULL; --- 9932,9944 ---- static char * dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) { ! struct attribute *attr = NULL; ! ! if (cu->language == language_ada) ! attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu); ! if (!attr) ! attr = dwarf2_attr (die, DW_AT_name, cu); if (!attr || !DW_STRING (attr)) return NULL; --------------030507040908070903060509--