This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
problems with nested classes
- From: Dirk-Jan Jongeneel <dirkjjn at cobalt dot et dot tudelft dot nl>
- To: gdb at sources dot redhat dot com
- Date: Tue, 27 Jan 2004 11:55:52 +0100
- Subject: problems with nested classes
Hi,
I don't know if this is related to a bug or just a user error. As I
don't see a general help list I'll try this one.
I have a situation of classes like class A::C and class B::C. When there
is somewere a B::C variable a print in gdb will use A::C. ptype
my_variable will print :class C .....(which is of format A::C). I also
can't manage to cast it to the correct class. if I do print (B::C*)
my_variable I get a A parse error in expression, near `)'
How should I cast using subclasses? It seems it go wrong as soon as I
use a :: in the cast.
I have tried gdb 5.3 and 6 and latest. Compilation is using gcc3.2.3
Dirk-Jan