From: Alexandre Oliva <aoliva@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
gcc-patches List <gcc-patches@gcc.gnu.org>
Cc: ccoutant@gmail.com
Subject: Re: [PR59319] output friends in debug info
Date: Sat, 24 Sep 2016 02:39:00 -0000 [thread overview]
Message-ID: <orfuoqm9k4.fsf@livre.home> (raw)
In-Reply-To: <ord1kpg8ay.fsf@livre.home> (Alexandre Oliva's message of "Tue, 30 Aug 2016 20:12:53 -0300")
On Aug 30, 2016, Alexandre Oliva <aoliva@redhat.com> wrote:
> Handling non-template friends is kind of easy, but it required a bit
> of infrastructure in dwarf2out to avoid (i) forcing debug info for
> unused types or functions: DW_TAG_friend DIEs are only emitted if
> their DW_AT_friend DIE is emitted, and (ii) creating DIEs for such
> types or functions just to have them discarded at the end. To this
> end, I introduced a list (vec, actually) of types with friends,
> processed at the end of the translation unit, and a list of
> DW_TAG_friend DIEs that, when we're pruning unused types, reference
> DIEs that are still not known to be used, revisited after we finish
> deciding all other DIEs, so that we prune DIEs that would have
> referenced pruned types or functions.
> Handling template friends turned out to be trickier: there's no
> representation in DWARF for templates. I decided to give debuggers as
> much information as possible, enumerating all specializations of
> friend templates and outputting DW_TAG_friend DIEs referencing them as
> well. I considered marking those as DW_AT_artificial, to indicate
> they're not explicitly stated in the source code, but in the end we
> decided that was not useful. The greatest challenge was to enumerate
> all specializations of a template. It looked trivial at first, given
> DECL_TEMPLATE_INSTANTIATIONS, but it won't list specializations of
> class-scoped functions and of nested templates. For other templates,
> I ended up writing code to look for specializations in the hashtables
> of decl or type specializations. That's not exactly efficient, but it
> gets the job done.
Regstrapped on x86_64-linux-gnu and i686-linux-gnu, I'd failed to
mention.
Ping?
https://gcc.gnu.org/ml/gcc-patches/2016-08/msg02092.html
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
next prev parent reply other threads:[~2016-09-24 0:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 18:47 Alexandre Oliva
2016-08-22 11:36 ` Richard Biener
2016-08-26 5:26 ` Alexandre Oliva
2016-08-26 8:59 ` Richard Biener
2016-08-26 16:13 ` Jason Merrill
2016-08-30 23:13 ` Alexandre Oliva
2016-09-24 2:39 ` Alexandre Oliva [this message]
2016-10-19 10:17 ` Alexandre Oliva
2017-01-27 6:27 ` Alexandre Oliva
2017-03-21 18:35 ` Alexandre Oliva
2017-04-07 18:32 ` Alexandre Oliva
2017-04-10 16:24 ` Mike Stump
2017-12-07 21:04 ` Alexandre Oliva
2017-12-14 18:48 ` Jason Merrill
2017-12-19 21:57 ` Alexandre Oliva
2017-12-21 22:37 ` Jason Merrill
2017-04-12 22:06 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=orfuoqm9k4.fsf@livre.home \
--to=aoliva@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).