public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/8188] DW_AT_containing_type incorrectly emitted
       [not found] <bug-8188-4@http.gcc.gnu.org/bugzilla/>
@ 2024-01-23 12:23 ` rguenth at gcc dot gnu.org
  2024-01-28 17:18 ` tromey at gcc dot gnu.org
  2024-01-28 17:20 ` tromey at gcc dot gnu.org
  2 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-23 12:23 UTC (permalink / raw)
  To: gcc-bugs

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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug debug/8188] DW_AT_containing_type incorrectly emitted
       [not found] <bug-8188-4@http.gcc.gnu.org/bugzilla/>
  2024-01-23 12:23 ` [Bug debug/8188] DW_AT_containing_type incorrectly emitted rguenth at gcc dot gnu.org
@ 2024-01-28 17:18 ` tromey at gcc dot gnu.org
  2024-01-28 17:20 ` tromey at gcc dot gnu.org
  2 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu.org @ 2024-01-28 17:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Tom Tromey <tromey at gcc dot gnu.org> ---
The uses in gdb seem to all be for the old v2 C++ ABI.
Removing them might break that code, but OTOH that code
is untested, probably already broken, and anyway long
since obsolete.

Note that Rust+LLVM use this attribute as an extension,
to associate a vtable with a concrete type.  This is
what lets trait objects work in gdb.  There was a thread
on the GCC list (IIRC) about doing something similar
for C++; however, I can't find the thread now.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug debug/8188] DW_AT_containing_type incorrectly emitted
       [not found] <bug-8188-4@http.gcc.gnu.org/bugzilla/>
  2024-01-23 12:23 ` [Bug debug/8188] DW_AT_containing_type incorrectly emitted rguenth at gcc dot gnu.org
  2024-01-28 17:18 ` tromey at gcc dot gnu.org
@ 2024-01-28 17:20 ` tromey at gcc dot gnu.org
  2 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu.org @ 2024-01-28 17:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Tom Tromey <tromey at gcc dot gnu.org> ---
I wanted to mention -- I don't particularly care if this
attribute goes away or not (assuming it indeed doesn't
negatively affect gdb), but I do dispute the idea that
DWARF proscribes which attributes may or may not appear.
DWARF itself claims to be lenient in the text.
Extensions like this are, and should be, commonplace;
and readers ought to ignore attributes they do not understand.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug debug/8188] DW_AT_containing_type incorrectly emitted
       [not found] <20021010105601.8188.miwako.tokugawa@intel.com>
  2003-05-26 21:44 ` pinskia@physics.uc.edu
  2003-06-12 20:27 ` drow@gcc.gnu.org
@ 2003-08-06  0:44 ` pinskia at physics dot uc dot edu
  2 siblings, 0 replies; 6+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-06  0:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug debug/8188] DW_AT_containing_type incorrectly emitted
       [not found] <20021010105601.8188.miwako.tokugawa@intel.com>
  2003-05-26 21:44 ` pinskia@physics.uc.edu
@ 2003-06-12 20:27 ` drow@gcc.gnu.org
  2003-08-06  0:44 ` pinskia at physics dot uc dot edu
  2 siblings, 0 replies; 6+ messages in thread
From: drow@gcc.gnu.org @ 2003-06-12 20:27 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


drow@gcc.gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-12 20:27:13
               date|                            |


------- Additional Comments From drow@gcc.gnu.org  2003-06-12 20:27 -------
I've been convinced that this is actually a bug.  We need to find
another way to get this information in GDB first before fixing it,
however.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug debug/8188] DW_AT_containing_type incorrectly emitted
       [not found] <20021010105601.8188.miwako.tokugawa@intel.com>
@ 2003-05-26 21:44 ` pinskia@physics.uc.edu
  2003-06-12 20:27 ` drow@gcc.gnu.org
  2003-08-06  0:44 ` pinskia at physics dot uc dot edu
  2 siblings, 0 replies; 6+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-26 21:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From pinskia@physics.uc.edu  2003-05-26 21:38 -------
See Daniel Jacobowitz's question



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-28 17:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-8188-4@http.gcc.gnu.org/bugzilla/>
2024-01-23 12:23 ` [Bug debug/8188] DW_AT_containing_type incorrectly emitted rguenth at gcc dot gnu.org
2024-01-28 17:18 ` tromey at gcc dot gnu.org
2024-01-28 17:20 ` tromey at gcc dot gnu.org
     [not found] <20021010105601.8188.miwako.tokugawa@intel.com>
2003-05-26 21:44 ` pinskia@physics.uc.edu
2003-06-12 20:27 ` drow@gcc.gnu.org
2003-08-06  0:44 ` pinskia at physics dot uc dot edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).