------- Comment #1 from dodji at gcc dot gnu dot org  2010-02-12 15:48 -------
There are actually up to three destructors:

- an in-charge one (or complete-object one)
- a not-in-charge one
- a deleting in-charge one

The three of them are useful in different ways and in different circumstances. 

The destructor being represented in the DWARF output right now is the
"abstract" one, i.e. the one that got cloned (at most) 3 times into the 3
different types of destructors. It doesn't have any DW_AT_vtable_elem_location
precisely because that abstract version of destructor is not present in the
vtable. The destructors present in vtable are the clones. We do not output
those in the debug info today.

Daniel, why would you prefer having the DW_AT_vtable_elem_location only for the
in-charge one?

We could chose to have all three of them being represented in the DWARF output
but then there should be a way to say that they are different concrete
instances of the abstract ~A destructor. Maybe by using the extension
DW_AT_MIPS_clone_origin to make it point to the abstract constructor/destructor
instance which a particular constructor/destructor clone implements?


-- 

dodji at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dodji at gcc dot gnu dot org
         AssignedTo|dodji at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37237

Reply via email to