This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7081: DWARF enhancements for C++
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 20 Jun 2002 16:06:01 -0000
- Subject: Re: c++/7081: DWARF enhancements for C++
- Reply-to: Daniel Jacobowitz <drow at mvista dot com>
The following reply was made to PR c++/7081; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@mvista.com>
To: jcownie@etnus.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7081: DWARF enhancements for C++
Date: Thu, 20 Jun 2002 12:04:59 -0400
On Thu, Jun 20, 2002 at 10:13:22AM +0100, jcownie@etnus.com wrote:
>
> >Number: 7081
> >Category: c++
> >Synopsis: DWARF enhancements for C++
> >Confidential: no
> >Severity: non-critical
> >Priority: medium
> >Responsible: unassigned
> >State: open
> >Class: change-request
> >Submitter-Id: net
> >Arrival-Date: Thu Jun 20 02:16:04 PDT 2002
> >Closed-Date:
> >Last-Modified:
> >Originator: James Cownie
> >Release: 3.1
> >Organization:
> Etnus LLC
> >Environment:
> System: Linux pc4 2.4.18 #1 Tue Apr 2 10:17:01 BST 2002 i686 unknown
> Architecture: i686
>
>
> host: i686-pc-linux-gnu
> build: i686-pc-linux-gnu
> target: i686-pc-linux-gnu
> configured with: /home1/GNU/gcc-3.1/configure
> >Description:
> 1) g++ emits classes in DWARF with the DW_TAG_structure_type rather
> than the DW_TAG_class_type which is suggested in the DWARF V3
> specification. This makes it hard for a debugger to show the type
> name correctly since it can't tell whether the class was _really_
> introduced by the class or struct keywords.
This one's true, but...
> 2) g++ does not emit any debug information for the vtable pointer in
> classes with virtual functions. It would be much nicer if this
> information were emitted (tagged with AT_artificial), since it's
> often very useful to be able to see the vtable pointer while
> debugging, as that's how one can work out which class an object
> _actually_ is when one is looking at a base class pointer.
This one isn't really necessary. The ABI specifies where the vtable
pointer will be, and GDB is quite capable of using that knowledge to
identify the runtime type. I believe even 'whatis' will do this for
you. Whichever debugger you're using must have an understanding of the
binary's ABI to debug C++ anyway...
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer