From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19680 invoked by alias); 30 Oct 2002 17:20:24 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19473 invoked from network); 30 Oct 2002 17:20:20 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 30 Oct 2002 17:20:20 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 186xRR-00083S-00; Wed, 30 Oct 2002 12:19:45 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 186wWR-0007H4-00; Wed, 30 Oct 2002 12:20:51 -0500 Date: Wed, 30 Oct 2002 09:20:00 -0000 From: Daniel Jacobowitz To: Kris Warkentin Cc: gdb@sources.redhat.com Subject: Re: gnu-v3-abi.c: problems w/ virtual base class Message-ID: <20021030172051.GA27733@nevyn.them.org> Mail-Followup-To: Kris Warkentin , gdb@sources.redhat.com References: <120101c28037$3ddb3d10$d8020c0a@catdog> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <120101c28037$3ddb3d10$d8020c0a@catdog> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-10/txt/msg00204.txt.bz2 On Wed, Oct 30, 2002 at 12:10:26PM -0500, Kris Warkentin wrote: > Hello, > > We're porting gdb 5.2.1 to our toolchain and I'm noticing a problem with > inherited virtual base classes. > > Given: > > class vA { > public: > int va; > int vx; > }; > > class vB : public virtual vA { > public: > int vb; > int vx; > }; > > vB g_vB; > > we get the failure: > > Expected output: > (gdb) print g_vB > $73 = { = {va = 3, vx = 4}, _vb$vA = 0x80422a4, vb = 5, vx = 6} > (gdb) > > Output given: > (gdb) print g_vB > $67 = {Expected a negative vbase offset (old compiler?) > (gdb) > > Now I looked at the comment for this in gnu-v3-abi.c and I'm guessing the > issue has to do with the fact that we're using gcc-2.95.3. I'm thinking > that, because this worked with gdb-5.0, it's probably a configuration error > in how we build gdb. Can anyone tell me anything about the c++ abi stuff > and if there's any way to make it play nicely with an older gcc? Well, why do you have it using the gnu-v3 code? You've got a patently gnu-v2 compiler. Please don't tell me QNX has a symbol starting with _Z in normal binaries... that would fool the autodetection code. I think Free Pascal has a similar problem, since it starts all symbols with underscores. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer