From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23843 invoked by alias); 18 Sep 2002 13:17:23 -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 23836 invoked from network); 18 Sep 2002 13:17:22 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 18 Sep 2002 13:17:22 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17rfdf-0005hJ-00; Wed, 18 Sep 2002 09:17:11 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17rehe-0002Ig-00; Wed, 18 Sep 2002 09:17:14 -0400 Date: Wed, 18 Sep 2002 06:17:00 -0000 From: Daniel Jacobowitz To: Pierre Muller Cc: gdb-patches@sources.redhat.com Subject: Re: [Problem] gnu-v3 abi loaded wronly. Message-ID: <20020918131713.GA8720@nevyn.them.org> Mail-Followup-To: Pierre Muller , gdb-patches@sources.redhat.com References: <4.2.0.58.20020918115440.015557e8@ics.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4.2.0.58.20020918115440.015557e8@ics.u-strasbg.fr> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-09/txt/msg00385.txt.bz2 On Wed, Sep 18, 2002 at 12:00:22PM +0200, Pierre Muller wrote: > > > The code for loading gnu-v3-abi is symply to > look if there is a minimal symbol starting with > _Z > underscore followed by a capital Z: > > Why is this test so imprecise? > To what symbol generated by GCC > v3 does it correspond? > Why is it not a full name test? > > Currently this creates a problem for me when > I mix GCC 2.95.X code with Free Pascal generated > code on linux, because Free Pascal defines > a minimal symbol _ZONE_NAMES > that is recognized as a GCC v3 marker... > > if you create a c code with a static variable > called _Zzzz > you will probably get the same error... > > I consider this to be a bug in GDB, but > I would like to get the arguments of the > interested people. Every mangled name in v3 starts with _Z. We've always held that if you use names in the reserved namespace for your own functions, you get what you deserve - but we hadn't thought any other compilers used this namespace... We could require that the first _Z symbol be a valid mangled C++ name. That would sometimes break the test in the other direction if you had v3 code linked with Free Pascal code. Does Free Pascal define a large number of symbols starting with _Z, or just the one? If it's just the one we can fix this by checking all _Z symbols until we find one that is v3 mangled. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer