This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: DW_AT_containing_type
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: David Carlton <carlton at kealia dot com>
- Cc: gdb <gdb at sources dot redhat dot com>, Elena Zannoni <ezannoni at redhat dot com>,Jim Blandy <jimb at redhat dot com>
- Date: Thu, 12 Jun 2003 14:07:14 -0400
- Subject: Re: DW_AT_containing_type
- References: <m3brx3facd.fsf@dhcp-10-42-69-238.kealia.com>
On Thu, Jun 12, 2003 at 10:56:50AM -0700, David Carlton wrote:
> What's with GDB's and GCC's use of DW_AT_containing type? As far as I
> can tell, it's only supposed to be used within
> DW_TAG_ptr_to_member_type, but GCC generates it and GDB uses it in
> many other contexts.
>
> I'll try to find time to figure out how we use it later, but I wanted
> to raise the issue in case anybody knows the answer or in case other
> people aren't aware that we seem to be misusing it.
We are misusing it. See the GCC source for a comment explaining this
GNU extension. We use it to indicate which base type contains the
vtable pointer for the derived class; there are a number of other ways
to do it, and at one point we should switch to another way.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer