public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/49312] New: Make DW_AT_name contain only simple name, no template-id
@ 2011-06-07 16:49 dodji at gcc dot gnu.org
  2011-06-07 16:50 ` [Bug debug/49312] " dodji at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-06-07 16:49 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Make DW_AT_name contain only simple name, no
                    template-id
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dodji@gcc.gnu.org


The DW_AT_name attribute of DIEs representing template instantiations should
not contain template-ids, but rather only contain the simple name of the
template.

This is true especially now that G++ emits debug information describing
template arguments in such DIEs.


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

* [Bug debug/49312] Make DW_AT_name contain only simple name, no template-id
  2011-06-07 16:49 [Bug debug/49312] New: Make DW_AT_name contain only simple name, no template-id dodji at gcc dot gnu.org
@ 2011-06-07 16:50 ` dodji at gcc dot gnu.org
  2011-06-07 22:11 ` dodji at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-06-07 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.06.07 16:50:22
         AssignedTo|unassigned at gcc dot       |dodji at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #1 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-06-07 16:50:22 UTC ---
A public DWARF request for clarification about this issue should appear soon. 
I'll then add a link to it here.


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

* [Bug debug/49312] Make DW_AT_name contain only simple name, no template-id
  2011-06-07 16:49 [Bug debug/49312] New: Make DW_AT_name contain only simple name, no template-id dodji at gcc dot gnu.org
  2011-06-07 16:50 ` [Bug debug/49312] " dodji at gcc dot gnu.org
@ 2011-06-07 22:11 ` dodji at gcc dot gnu.org
  2014-04-29 16:26 ` tromey at gcc dot gnu.org
  2023-01-12 18:29 ` dblaikie at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-06-07 22:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-06-07 22:11:40 UTC ---
Created attachment 24464
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24464
Candidate patch

I am currently testing this candidate patch.


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

* [Bug debug/49312] Make DW_AT_name contain only simple name, no template-id
  2011-06-07 16:49 [Bug debug/49312] New: Make DW_AT_name contain only simple name, no template-id dodji at gcc dot gnu.org
  2011-06-07 16:50 ` [Bug debug/49312] " dodji at gcc dot gnu.org
  2011-06-07 22:11 ` dodji at gcc dot gnu.org
@ 2014-04-29 16:26 ` tromey at gcc dot gnu.org
  2023-01-12 18:29 ` dblaikie at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu.org @ 2014-04-29 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

Tom Tromey <tromey at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at gcc dot gnu.org

--- Comment #3 from Tom Tromey <tromey at gcc dot gnu.org> ---
FWIW I am not totally sold on this idea.
It's attractive in an abstract way but I am not
sure what impact it will have on gdb in practice.


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

* [Bug debug/49312] Make DW_AT_name contain only simple name, no template-id
  2011-06-07 16:49 [Bug debug/49312] New: Make DW_AT_name contain only simple name, no template-id dodji at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-04-29 16:26 ` tromey at gcc dot gnu.org
@ 2023-01-12 18:29 ` dblaikie at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dblaikie at gmail dot com @ 2023-01-12 18:29 UTC (permalink / raw)
  To: gcc-bugs

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

David Blaikie <dblaikie at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dblaikie at gmail dot com

--- Comment #4 from David Blaikie <dblaikie at gmail dot com> ---
FWIW I've (partially) implemented this in Clang under the flag
`-gsimple-template-names` due to some really large debug info issues with
(especially eigen and tensorflow) expression templates (I saw template names as
long as 50k characters leading to exceeding the 32 bit limit in .debug_str.dwo
sections in dwp files (and gold dwp didn't check for overflow, so this caused
silent corruption)).

There certainly are some issues with it - my approach didn't simplify all names
- certain names aren't easy to roundtrip from the DIE descriptions of the
template parameters (lambdas are a great/difficult example, for instance - the
lambda type DIEs don't have anything about the lambda mangling number, etc, and
maybe should - so even in non-template cases the lambdas could be matched up
between two TUs (lambdas in inline functions are the same type even in
different translation units & should be treated as such))

So there's a bunch of work that'd probably need to be done on template DIE
accuracy/completeness before this feature could be adopted wholesale without
any exemptions, but for the size benefits (especially in expression template
heavy code) I've found it to be worthwhile & we've done some work to flesh out
support for this in lldb as well as identify maybe a couple of gdb bugs related
to this.

I've tried to poke dwarf-discuss about the lambda issue in particular (
http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2022-August/007117.html
) but no one seems interested in discussing it. So maybe it's something
GCC/Clang/GDB/LLDB folks should discuss more directly together.

Also some recent discussion with Simon Marchi on the gdb list:
https://sourceware.org/pipermail/gdb/2023-January/050496.html

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

end of thread, other threads:[~2023-01-12 18:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-07 16:49 [Bug debug/49312] New: Make DW_AT_name contain only simple name, no template-id dodji at gcc dot gnu.org
2011-06-07 16:50 ` [Bug debug/49312] " dodji at gcc dot gnu.org
2011-06-07 22:11 ` dodji at gcc dot gnu.org
2014-04-29 16:26 ` tromey at gcc dot gnu.org
2023-01-12 18:29 ` dblaikie at gmail dot com

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).