From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14596 invoked by alias); 11 Mar 2003 00:57:05 -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 14589 invoked from network); 11 Mar 2003 00:57:05 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 11 Mar 2003 00:57:05 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18sZy2-0001aw-00; Mon, 10 Mar 2003 20:58:14 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18sY4e-0005TG-00; Mon, 10 Mar 2003 19:56:56 -0500 Date: Tue, 11 Mar 2003 00:57:00 -0000 From: Daniel Jacobowitz To: David Carlton Cc: gdb , Michael Elizabeth Chastain Subject: Re: GCC, stabs, mangled names Message-ID: <20030311005656.GA20906@nevyn.them.org> Mail-Followup-To: David Carlton , gdb , Michael Elizabeth Chastain References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-03/txt/msg00151.txt.bz2 On Mon, Mar 10, 2003 at 04:53:26PM -0800, David Carlton wrote: > Is there a problem with gcc -gstabs+ and mangled names in recent > GCC's? I'm no stabs expert, but when I compile this file: > > namespace C { > namespace D { > int cd = 1; > } > } > > with GCC 3.1 with g++ -gstabs+ -S -dA, I get output where the only > bits that mention the variable in question are: > > .globl _ZN1C1D2cdE > .data > .align 4 > .type _ZN1C1D2cdE,@object > .size _ZN1C1D2cdE,4 > _ZN1C1D2cdE: > .long 1 > .stabs "cd:G(0,1)",32,0,3,0 > > Is GDB supposed to be able to figure out the mangled name for C::D::cd > from that? Or does stabs not contain that sort of info? (Or is this > a bug that more recent GCC's have fixed?) > > I seem to recall a discussion about this earlier, but I can't remember > the outcome, and I couldn't find anything relevant in GDB's or GCC's > bug database. It's unclear what the right thing to do is. Stabs is underspecified (and underimplemented too). Someone needs to decide what would be useful. Sun has namespace markers in their stabs output. Maybe we should just make GCC generate them. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer