From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3507 invoked by alias); 10 Mar 2004 16:16:26 -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 3500 invoked from network); 10 Mar 2004 16:16:26 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 10 Mar 2004 16:16:26 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i2AGGP07029197 for ; Wed, 10 Mar 2004 11:16:25 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2AGGOM09746 for ; Wed, 10 Mar 2004 11:16:24 -0500 Received: from cygbert.vinschen.de (vpn50-12.rdu.redhat.com [172.16.50.12]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i2AGGNR13304 for ; Wed, 10 Mar 2004 08:16:23 -0800 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 36BAD580E2; Wed, 10 Mar 2004 17:16:17 +0100 (CET) Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [RFA] minsyms.c: Fix switching to GNU v3 ABI Message-ID: <20040310161617.GO25204@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20040310105709.GJ25204@cygbert.vinschen.de> <20040310150822.GA31014@nevyn.them.org> <20040310155450.GN25204@cygbert.vinschen.de> <20040310160410.GA410@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040310160410.GA410@nevyn.them.org> User-Agent: Mutt/1.4.2i X-RedHat-Spam-Score: -4.9 X-SW-Source: 2004-03/txt/msg00233.txt.bz2 Message-ID: <20040319000900.nE09IHOD-qoVx6GO6QFifgRUbO8GoF1dRN-leI2zhXk@z> On Mar 10 11:04, Daniel Jacobowitz wrote: > > > to me like you are having a problem with leading underscores, if I > > > remember my sh-elf-foo correctly. > > > > Could you tell more about that? I see a big bunch of symbols beginning > > with "__Z". Is that what you mean? > > Yes, precisely. On sh-elf all symbols are prefixed with an underscore. > I've been curious for a while about where, precisely, the leading > underscore is supposed to get stripped before we demangle; apparently, > the answer is "not early enough". Ok, I think I see now what happens. There are symbols beginning with "_Z" and (the most) beginning with "__Z". The symbols beginning with "_Z" are correctly recognized as language_cplus. The symbols beginning with "__Z" are still language_auto after prim_record_minimal_symbol_and_info has been called, since the demangler in libiberty doesn't recognize them. In install_minimal_symbols(), line 864ff is a loop, which strips the first character from SYMBOL_LINKAGE_NAME, if that character equals get_symbol_leading_char (objfile->obfd). This leading_char is set to "_". So, after this loop SYMBOL_LINKAGE_NAME begins with "Z" for the first set of symbols (which *are* recognized as cplus variables) and with "_Z" for the second set of symbols (which are still auto). But now SYMBOL_DEMANGLED_NAME is only called for the second set of symbols and SYMBOL_DEMANGLED_NAME returns NULL for those symbols. What can we do?!? Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc.