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]

Namespaces with gcc v3 stabs+?


Question for Daniel J or David C or Kevin B or anybody who knows
about v3 and stabs support ...

I'm looking at disimprovements from gcc v2 to gcc v3.  One of the
issues is that gcc 2.95.3 / stabs+ emits stab information
for symbols in namespaces, but gcc 3.2.1 / stabs+ emits the stab
information with the wrong name.

Here is a test program:

  namespace AAA
  {
    char mychar;
  }

Here is the output with gcc 2.95.3:

  # gcc 2.95.3, -gstabs+, native i686-pc-linux-gnu
  .stabs "_3AAA.mychar:G(0,2)",32,0,3,0
  .globl _3AAA.mychar
  .bss
	  .type    _3AAA.mychar,@object
	  .size    _3AAA.mychar,1
  _3AAA.mychar:
	  .zero   1

And here is the output with gcc 3.2.1:

  # gcc 3.2.1, -gstabs+, native i686-pc-linux-gnu
  .globl _ZN3AAA6mycharE
	  .bss
	  .type   _ZN3AAA6mycharE,@object
	  .size   _ZN3AAA6mycharE,1
  _ZN3AAA6mycharE:
	  .zero   1
	  .stabs  "mychar:G(0,2)",32,0,3,0

Notice how the stab refers to "mychar", not "_ZN3AAA6mycharE".

The output is similar with gcc 3.0.4, gcc 3.1, gcc 3.1.1, gcc 3.2,
and gcc HEAD%20021203.

Is this ringing any bells?

Kevin B had a similar issue in May 2002:

  http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01661.html

I would like to file a bug report against gcc, and then change
the test script gdb.c++/namespace.exp to XFAIL the test with
stabs+ format and v3 (or later) compilers.

Michael C


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