From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27384 invoked by alias); 29 Nov 2004 02:12:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26901 invoked from network); 29 Nov 2004 02:12:08 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 29 Nov 2004 02:12:08 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iAT2C7AA010877 for ; Sun, 28 Nov 2004 21:12:07 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iAT2C7r11459 for ; Sun, 28 Nov 2004 21:12:07 -0500 Received: from localhost.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id iAT2C6QB010400; Sun, 28 Nov 2004 21:12:06 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 148E81A467A; Sun, 28 Nov 2004 21:08:03 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16810.33923.904081.661032@localhost.redhat.com> Date: Mon, 29 Nov 2004 02:12:00 -0000 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA/dwarf2] Use SYMBOL_SEARCH_NAME to set type name In-Reply-To: <20041101195035.GJ27334@gnat.com> References: <20041022213911.GJ21300@gnat.com> <20041101195035.GJ27334@gnat.com> X-SW-Source: 2004-11/txt/msg00501.txt.bz2 Joel Brobecker writes: > With the patch, I think I have a better change of getting a review... > > > > On Fri, Oct 22, 2004 at 02:39:11PM -0700, Joel Brobecker wrote: > > Right now, new_symbol() in dwarf2read.c sometimes sets the type name > > using the SYMBOL_NATURAL_NAME. This is causing problems with Ada, > > because contrary to C++ or Java, we chose to perform our searches using > > the mangled name, not the demangled one. > > > > 2004-10-22 Joel Brobecker > > > > From Paul Hilfinger > > * dwarf2read.c (new_symbol): Use SYMBOL_SEARCH_NAME rather than > > SYMBOL_NATURAL_NAME to set type names. > > > > Tested on x86-linux. No regression. > > OK to apply? > > -- > Joel > Index: dwarf2read.c > =================================================================== > RCS file: /cvs/src/src/gdb/dwarf2read.c,v > retrieving revision 1.168 > diff -u -p -r1.168 dwarf2read.c > --- dwarf2read.c 19 Oct 2004 20:28:56 -0000 1.168 > +++ dwarf2read.c 1 Nov 2004 19:49:49 -0000 > @@ -6922,7 +6922,7 @@ new_symbol (struct die_info *die, struct > this objfile, so we don't need to duplicate it for > the type. */ > if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) > - TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_NATURAL_NAME (sym); > + TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_SEARCH_NAME (sym); > add_symbol_to_list (typedef_sym, list_to_add); > } > } Sigh, this is a hack on top af another. Unfortunately the initial review of the symtab Ada changes wasn't helpful. I have no choice but to let this go in for now, however, please, start thinking of a way to get rid of those special cases in SYMBOL_blah_NAME. Making those become part of the language vector comes to mind. Can you come up with a test case for gdb.ada that shows the problem, and is cured by this patch?