Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: David Carlton <carlton@math.stanford.edu>
Cc: gdb <gdb@sources.redhat.com>, Michael Elizabeth Chastain <mec@shout.net>
Subject: Re: GCC, stabs, mangled names
Date: Tue, 11 Mar 2003 00:57:00 -0000	[thread overview]
Message-ID: <20030311005656.GA20906@nevyn.them.org> (raw)
In-Reply-To: <ro1fzpuu3jt.fsf@jackfruit.Stanford.EDU>

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


  reply	other threads:[~2003-03-11  0:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-11  0:53 David Carlton
2003-03-11  0:57 ` Daniel Jacobowitz [this message]
2003-03-11  1:20   ` David Carlton
2003-03-11  1:24     ` Daniel Jacobowitz
2003-03-11  5:55 Michael Elizabeth Chastain
2003-03-11 17:06 ` David Carlton
2003-03-11  6:07 Michael Elizabeth Chastain
2003-03-11 20:33 ` David Carlton
2003-03-11 17:24 Michael Elizabeth Chastain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030311005656.GA20906@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=carlton@math.stanford.edu \
    --cc=gdb@sources.redhat.com \
    --cc=mec@shout.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox