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]

nested class


Hi 

How to I specify casts with nested classes, e.g. 
if I enter the debugger command 
print (A::AA *)a
I get the error message:
A parse error in expression, near ')a'

I am using gdb version 6.1-debian.


class A{

public:
????????class?AA?{
????????????????public:
????????????????int?i;
????????};
????????int?j;
};

int main(){
????????void?*?p?=?new?A::AA();
????????//?set?breakpoint?here?and?enter?gdb-command:?print?(A::AA?*)p
}

Thanks in advance

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