This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/testsuite] gdb.c++/classes.exp: add another ptype pattern
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: carlton at kealia dot com, kevinb at redhat dot com
- Cc: drow at mvista dot com, gdb-patches at sources dot redhat dot com
- Date: Wed, 2 Jul 2003 16:58:35 -0400
- Subject: Re: [patch/testsuite] gdb.c++/classes.exp: add another ptype pattern
dc> Does this give fully-qualified names for types defined in namespaces,
dc> too?
Doh, I misread david's question.
kb> I guess the answer is, "Try it and let me know..."
Kevin's recollection matches what I see here ... types defined in namespaces
still have unqualifed names with gcc 3.3. Same with gcc HEAD.
Michael C
=== namespace.cc
namespace Foo
{
class NestedClass { public: int alpha; };
enum NestedEnum { red, green, blue, yellow = 42 };
typedef double NestedTypedef;
NestedClass nc_1;
NestedEnum ne_1;
NestedTypedef nt_1;
};
Foo::NestedClass nc_2;
Foo::NestedEnum ne_2;
Foo::NestedTypedef nt_2;
=== namespace.323.s
.file "namespace.cc"
.stabs "/berman/home/mgnu/tmp/cwe/",100,0,0,.Ltext0
.stabs "namespace.cc",100,0,0,.Ltext0
.text
.Ltext0:
.stabs "gcc2_compiled.",60,0,0,0
.stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0
.stabs "char:t(0,2)=r(0,2);0;127;",128,0,0,0
.stabs "long int:t(0,3)=r(0,3);-2147483648;2147483647;",128,0,0,0
.stabs "unsigned int:t(0,4)=r(0,4);0000000000000;0037777777777;",128,0,0,0
.stabs "long unsigned int:t(0,5)=r(0,5);0000000000000;0037777777777;",128,0,0,0
.stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,0
.stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0000000000000;01777777777777777777777;",128,0,0,0
.stabs "short int:t(0,8)=@s16;r(0,8);-32768;32767;",128,0,0,0
.stabs "short unsigned int:t(0,9)=@s16;r(0,9);0;65535;",128,0,0,0
.stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
.stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
.stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0
.stabs "double:t(0,13)=r(0,1);8;0;",128,0,0,0
.stabs "long double:t(0,14)=r(0,1);12;0;",128,0,0,0
.stabs "complex int:t(0,15)=s8real:(0,1),0,32;imag:(0,1),32,32;;",128,0,0,0
.stabs "complex float:t(0,16)=R3;8;0;",128,0,0,0
.stabs "complex double:t(0,17)=R4;16;0;",128,0,0,0
.stabs "complex long double:t(0,18)=R5;24;0;",128,0,0,0
.stabs "wchar_t:t(0,19)=r(0,19);-2147483648;2147483647;",128,0,0,0
.stabs "__builtin_va_list:t(0,20)=*(0,2)",128,0,0,0
.stabs "bool:t(0,21)=@s8;-16;",128,0,0,0
.stabs "__vtbl_ptr_type:t(0,22)=*(0,23)=f(0,1)",128,0,0,0
.stabs "namespace.cc",130,0,0,0
.stabs "NestedClass:Tt(1,1)=s4alpha:(0,1),0,32;operator=::(1,2)=#(1,1),(1,3)=&(1,1),(1,4)=*(1,1),(1,5)=&(1,6)=k(1,1),(1,7)=(1,7);:_ZN3Foo11NestedClassaSERKS0_;2A.;__base_ctor::(1,8)=#(1,1),(1,7),(1,4),(1,5),(1,7);:_ZN3Foo11NestedClassC2ERKS0_;2A.;__comp_ctor::(1,8):_ZN3Foo11NestedClassC1ERKS0_;2A.;__base_ctor::(1,9)=#(1,1),(1,7),(1,4),(1,7);:_ZN3Foo11NestedClassC2Ev;2A.;__comp_ctor::(1,9):_ZN3Foo11NestedClassC1Ev;2A.;;",128,0,3,0
.stabs "NestedEnum:t(1,10)=ered:0,green:1,blue:2,yellow:42,;",128,0,4,0
.stabs "NestedTypedef:t(1,11)=(0,13)",128,0,5,0
.globl _ZN3Foo4nc_1E
.bss
.align 4
.type _ZN3Foo4nc_1E,@object
.size _ZN3Foo4nc_1E,4
_ZN3Foo4nc_1E:
.zero 4
.globl _ZN3Foo4ne_1E
.align 4
.type _ZN3Foo4ne_1E,@object
.size _ZN3Foo4ne_1E,4
_ZN3Foo4ne_1E:
.zero 4
.globl _ZN3Foo4nt_1E
.align 8
.type _ZN3Foo4nt_1E,@object
.size _ZN3Foo4nt_1E,8
_ZN3Foo4nt_1E:
.zero 8
.globl nc_2
.align 4
.type nc_2,@object
.size nc_2,4
nc_2:
.zero 4
.globl ne_2
.align 4
.type ne_2,@object
.size ne_2,4
ne_2:
.zero 4
.globl nt_2
.align 8
.type nt_2,@object
.size nt_2,8
nt_2:
.zero 8
.stabs "nc_1:G(1,1)",32,0,7,0
.stabs "ne_1:G(1,10)",32,0,8,0
.stabs "nt_1:G(1,11)",32,0,9,0
.stabs "nc_2:G(1,1)",32,0,12,0
.stabs "ne_2:G(1,10)",32,0,13,0
.stabs "nt_2:G(1,11)",32,0,14,0
.text
.stabs "",100,0,0,.Letext
.Letext:
.ident "GCC: (GNU) 3.2.3"
=== namespace.33.s
.file "namespace.cc"
.stabs "/berman/home/mgnu/tmp/cwe/",100,0,0,.Ltext0
.stabs "namespace.cc",100,0,0,.Ltext0
.text
.Ltext0:
.stabs "gcc2_compiled.",60,0,0,0
.stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0
.stabs "char:t(0,2)=r(0,2);0;127;",128,0,0,0
.stabs "long int:t(0,3)=r(0,3);-2147483648;2147483647;",128,0,0,0
.stabs "unsigned int:t(0,4)=r(0,4);0000000000000;0037777777777;",128,0,0,0
.stabs "long unsigned int:t(0,5)=r(0,5);0000000000000;0037777777777;",128,0,0,0
.stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,0
.stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0000000000000;01777777777777777777777;",128,0,0,0
.stabs "short int:t(0,8)=@s16;r(0,8);-32768;32767;",128,0,0,0
.stabs "short unsigned int:t(0,9)=@s16;r(0,9);0;65535;",128,0,0,0
.stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
.stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
.stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0
.stabs "double:t(0,13)=r(0,1);8;0;",128,0,0,0
.stabs "long double:t(0,14)=r(0,1);12;0;",128,0,0,0
.stabs "complex int:t(0,15)=s8real:(0,1),0,32;imag:(0,1),32,32;;",128,0,0,0
.stabs "complex float:t(0,16)=R3;8;0;",128,0,0,0
.stabs "complex double:t(0,17)=R4;16;0;",128,0,0,0
.stabs "complex long double:t(0,18)=R5;24;0;",128,0,0,0
.stabs "wchar_t:t(0,19)=r(0,19);-2147483648;2147483647;",128,0,0,0
.stabs "__builtin_va_list:t(0,20)=*(0,2)",128,0,0,0
.stabs "bool:t(0,21)=@s8;-16;",128,0,0,0
.stabs "__vtbl_ptr_type:t(0,22)=*(0,23)=f(0,1)",128,0,0,0
.stabs "namespace.cc",130,0,0,0
.stabs "NestedClass:Tt(1,1)=s4alpha:(0,1),0,32;operator=::(1,2)=#(1,1),(1,3)=&(1,1),(1,4)=*(1,1),(1,5)=&(1,6)=k(1,1),(1,7)=(1,7);:_ZN3Foo11NestedClassaSERKS0_;2A.;__base_ctor::(1,8)=#(1,1),(1,7),(1,4),(1,5),(1,7);:_ZN3Foo11NestedClassC2ERKS0_;2A.;__comp_ctor::(1,8):_ZN3Foo11NestedClassC1ERKS0_;2A.;__base_ctor::(1,9)=#(1,1),(1,7),(1,4),(1,7);:_ZN3Foo11NestedClassC2Ev;2A.;__comp_ctor::(1,9):_ZN3Foo11NestedClassC1Ev;2A.;;",128,0,3,0
.stabs "NestedEnum:t(1,10)=ered:0,green:1,blue:2,yellow:42,;",128,0,4,0
.stabs "NestedTypedef:t(1,11)=(0,13)",128,0,5,0
.globl _ZN3Foo4nc_1E
.bss
.align 4
.type _ZN3Foo4nc_1E, @object
.size _ZN3Foo4nc_1E, 4
_ZN3Foo4nc_1E:
.zero 4
.globl _ZN3Foo4ne_1E
.align 4
.type _ZN3Foo4ne_1E, @object
.size _ZN3Foo4ne_1E, 4
_ZN3Foo4ne_1E:
.zero 4
.globl _ZN3Foo4nt_1E
.align 8
.type _ZN3Foo4nt_1E, @object
.size _ZN3Foo4nt_1E, 8
_ZN3Foo4nt_1E:
.zero 8
.globl nc_2
.align 4
.type nc_2, @object
.size nc_2, 4
nc_2:
.zero 4
.globl ne_2
.align 4
.type ne_2, @object
.size ne_2, 4
ne_2:
.zero 4
.globl nt_2
.align 8
.type nt_2, @object
.size nt_2, 8
nt_2:
.zero 8
.stabs "nc_2:G(1,1)",32,0,12,0
.stabs "ne_2:G(1,10)",32,0,13,0
.stabs "nt_2:G(1,11)",32,0,14,0
.stabs "nc_1:G(1,1)",32,0,7,0
.stabs "ne_1:G(1,10)",32,0,8,0
.stabs "nt_1:G(1,11)",32,0,9,0
.text
.stabs "",100,0,0,.Letext
.Letext:
.ident "GCC: (GNU) 3.3"