From: Jakub Jelinek <jakub@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Debug info for comdat functions
Date: Thu, 19 Apr 2012 05:29:00 -0000 [thread overview]
Message-ID: <20120419052927.GF1933@tyan-ft48-01.lab.bos.redhat.com> (raw)
In-Reply-To: <20120418132335.GH16117@tyan-ft48-01.lab.bos.redhat.com>
On Wed, Apr 18, 2012 at 03:23:35PM +0200, Jakub Jelinek wrote:
> > DW_TAG_GNU_call_site wants to refer to the called function's DIE, so
> > the function die in the separate unit needs to have its own symbol.
> > Perhaps _call_site could refer to the function symbol instead? That
> > seems more correct anyway, since with COMDAT functions you might end
> > up calling a different version of the function that has a different
> > DIE.
>
> At this point it is too late to change the specification of the extension.
> But you could just put in a DW_TAG_subprogram DW_AT_external declaration
> in the main .debug_info and just refer to that from call_site as well
> as from DW_AT_specification in the comdat .debug_info. That
> DW_AT_abstract_origin is meant there to be just one of the possible many
> DIEs referring to the callee, the debug info consumer is supposed to find
> out the actual DIE that contains the code from it using its usual
> mechanisms.
That could be easily done by keeping around the original die_node of the
DW_TAG_subprogram for comdat in the main CU, create a new die_node in the
comdat unit and move all (or all but formal_parameter?) children to it
and copy/move attributes. Thus all references to the subprogram would go
to the main .debug_info.
Jakub
next prev parent reply other threads:[~2012-04-19 5:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 11:17 Jakub Jelinek
2012-04-18 11:53 ` Jakub Jelinek
2012-04-18 12:44 ` Jason Merrill
2012-04-18 13:24 ` Jakub Jelinek
2012-04-19 5:29 ` Jakub Jelinek [this message]
2012-04-18 23:40 ` Cary Coutant
2012-04-19 4:44 ` Jason Merrill
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=20120419052927.GF1933@tyan-ft48-01.lab.bos.redhat.com \
--to=jakub@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=jason@redhat.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).