This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: C++ nested classes, namespaces, structs, and compound statements
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: gdb at sources dot redhat dot com, Benjamin Kosnik <bkoz at redhat dot com>,Daniel Berlin <dan at dberlin dot org>
- Date: Sat, 06 Apr 2002 09:31:18 -0500
- Subject: Re: C++ nested classes, namespaces, structs, and compound statements
- References: <20020406044204.245E45EA11@zwingli.cygnus.com>
> 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