[Bug debug/37237] Debug information for virtual destructors omits DW_AT_vtable_elem_location

tromey at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 18 15:21:00 GMT 2013


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

--- Comment #11 from Tom Tromey <tromey at gcc dot gnu.org> 2013-02-18 15:20:56 UTC ---
(In reply to comment #10)
> I don't think such an attribute belongs in the DWARF standard, since this is
> very much an internal detail of the ABI; another ABI might have just a single
> destructor with magic arguments, like the old G++ ABI.
> 
> You need to know a lot about the destructor ABI as it is; looking for D0/D1
> doesn't seem like a major additional burden to me.

With git master I actually see multiple destructors now:

 <1><be>: Abbrev Number: 15 (DW_TAG_subprogram)
    <bf>   DW_AT_abstract_origin: <0x93>        
    <c3>   DW_AT_linkage_name: (indirect string, offset: 0x10): _ZN1AD2Ev       
    <c7>   DW_AT_low_pc      : 0x0      
    <cf>   DW_AT_high_pc     : 0x39 0x0 
    <d7>   DW_AT_frame_base  : 1 byte block: 9c         (DW_OP_call_frame_cfa)
    <d9>   DW_AT_object_pointer: <0xe1> 
    <dd>   DW_AT_GNU_all_tail_call_sites: 1     
    <dd>   DW_AT_sibling     : <0xea>   
[...]
 <1><ea>: Abbrev Number: 17 (DW_TAG_subprogram)
    <eb>   DW_AT_abstract_origin: <0x93>        
    <ef>   DW_AT_linkage_name: (indirect string, offset: 0x3e): _ZN1AD0Ev       
    <f3>   DW_AT_low_pc      : 0x3a     
    <fb>   DW_AT_high_pc     : 0x26 0x0 
    <103>   DW_AT_frame_base  : 1 byte block: 9c        (DW_OP_call_frame_cfa)
    <105>   DW_AT_object_pointer: <0x109>       
    <109>   DW_AT_GNU_all_tail_call_sites: 1    


What I'd like to know is what is guaranteed.
Previously gcc didn't emit the linkage name for any destructor -- but
this would make the proposed solution much harder to implement (gdb
would have to implement name mangling...).
So I suppose I'd like a guarantee that the destructor will be emitted
with at least one linkage name.



More information about the Gcc-bugs mailing list