This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC, stabs, mangled names


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.

Thanks,
David Carlton
carlton at math dot stanford dot edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]