C++ nested classes, namespaces, structs, and compound statements
Andrew Cagney
ac131313@cygnus.com
Sat Apr 6 06:31:00 GMT 2002
> At the moment, GDB doesn't handle C++ namespaces or nested classes
> very well. I have a general idea of how we could address these
> limitations, which I'd like to put up for shredding M-DEL discussion.
>
> Let me admit up front that I don't really know C++, so I may be saying
> stupid things. Please set me straight if you notice something.
>
> In C, structs are essentially lists of member names, types, and
> locations (offsets from the structure's base address):
>
> struct S { int x; char y; struct T t; }
>
> (Unions are just the same, except that the offsets are all zero. That
> relationship carries through the entire discussion here, so I'm not
> going to talk about unions any more.)
>
> If you think about it just right (or just wrong), this is really very
> similar to the set of local variables associated with a compound
> statement:
I'm very interested in hearing about what ACT did for Ada. As far as I
know Ada, with its packages et.al. has a very similar problem and,
potentially, working code.
Andrew
More information about the Gdb
mailing list