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]

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


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