From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22472 invoked by alias); 10 Mar 2004 19:02:48 -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 22448 invoked from network); 10 Mar 2004 19:02:47 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sources.redhat.com with SMTP; 10 Mar 2004 19:02:47 -0000 Received: (qmail 20709 invoked by uid 10); 10 Mar 2004 19:02:46 -0000 Received: (qmail 29301 invoked by uid 500); 10 Mar 2004 19:02:40 -0000 From: Ian Lance Taylor To: gdb-patches@sources.redhat.com Subject: Re: [RFA] minsyms.c: Fix switching to GNU v3 ABI References: <20040310105709.GJ25204@cygbert.vinschen.de> <20040310150822.GA31014@nevyn.them.org> <20040310155450.GN25204@cygbert.vinschen.de> <20040310160410.GA410@nevyn.them.org> <20040310161617.GO25204@cygbert.vinschen.de> <20040310162011.GA1067@nevyn.them.org> <20040310163416.GP25204@cygbert.vinschen.de> <20040310163716.GA2114@nevyn.them.org> <20040310175446.GR25204@cygbert.vinschen.de> <20040310184623.GU25204@cygbert.vinschen.de> Date: Fri, 19 Mar 2004 00:09:00 -0000 In-Reply-To: <20040310184623.GU25204@cygbert.vinschen.de> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-03/txt/msg00248.txt.bz2 Message-ID: <20040319000900.IOw-YT6JLr6gnAiCnj5cVv60CQyZtkNr80AHLIVSKkE@z> Corinna Vinschen writes: > > Consider this source code: > > > > void __verbose_terminate_handler() > > { > > static int terminating = 0; > > if (terminating) > > { > > return; > > } > > terminating = 1; > > } > > > > If you compile it as a C file, do you see the initial underscore on > > "terminating". If you compile it as a C++ file, do you see two > > initial underscores before the 'Z'? It should be consistent. > > It seems to be consistent: > > $ nm x.c.o > 00000000 T ___verbose_terminate_handler > 00000000 b terminating.0 > > $ nm x.cc.o > 00000000 b _ZZ27__verbose_terminate_handlervE11terminating > 00000000 T __Z27__verbose_terminate_handlerv Unfortunately, it seems to be consistently wrong. I think this is a gcc bug. The symbol prefix should be applied consistently to symbols whether they are globally or locally visible. I don't see just where it is happening, though. Ian