https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8188

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-12-28 06:14:46         |2024-1-23
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |tromey at gcc dot gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reconfirmed.  With modern dwarf we now emit even

 <1><4c>: Abbrev Number: 11 (DW_TAG_class_type)
    <4d>   DW_AT_name        : B
    <4f>   DW_AT_byte_size   : 16
    <50>   DW_AT_decl_file   : 1
    <51>   DW_AT_decl_line   : 9
    <52>   DW_AT_decl_column : 7
    <53>   DW_AT_containing_type: <0x4c>
    <57>   DW_AT_sibling     : <0x106>

which is a self-reference ...

The code adding this reads

      /* GNU extension: Record what type our vtable lives in.  */
      if (TYPE_VFIELD (type))
        {
          tree vtype = DECL_FCONTEXT (TYPE_VFIELD (type));

          gen_type_die (vtype, context_die);
          add_AT_die_ref (type_die, DW_AT_containing_type,
                          lookup_type_die (vtype));

(there are more "GNU extension" uses of DW_AT_containing_type)

Jason added this in 1996 with the commit message

x

(sic)

What does gdb do with all those "extension" uses of DW_AT_containing_type?
Can we just drop them all?

Reply via email to