public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/97599] [8/9/10/11 Regression] missing unspecified_parameters DIE in DWARF for functions with variable arguments
Date: Wed, 28 Oct 2020 07:41:11 +0000	[thread overview]
Message-ID: <bug-97599-4-rYcavZNSda@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97599-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think the main confusion is as to how we represent IPA clones in debug,
namely making them have an abstract origin to the cloned function even though
their signatures do not match.  In reality we're creating a new function
[entry] with a different signature.  I think a better representation for
a function clone would be

 <1><ab>: Abbrev Number: 10 (DW_TAG_subprogram)
          DW_AT_artificial : 1
<clone signature>

 <2>      DW_TAG_inlined_subroutine <original function DIE>

plus the parameter mapping.  Thus represent a clone as what it really is,
a new function calling the old one with appropriate parameters.

This doesn't work for the function splitting tail though (IIRC we had another
PR about that).

The question is whether we need to have any debug for the formal parameters
of clones or if it is enough to appropriately specify the
DW_TAG_inlined_subroutine (that's where users would expect breakpoints as
well).

So in the end I don't believe the current situation is "fixable" since we
cannot distinguish clones from abstract vs. concrete instances in the
DWARF itself.  And the abstract origin we have on the tree level is just
misleading.

  parent reply	other threads:[~2020-10-28  7:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 17:09 [Bug debug/97599] New: " jakub at gcc dot gnu.org
2020-10-27 17:09 ` [Bug debug/97599] " jakub at gcc dot gnu.org
2020-10-28  7:41 ` rguenth at gcc dot gnu.org [this message]
2020-10-28  7:43 ` rguenth at gcc dot gnu.org
2020-10-28  9:10 ` rguenth at gcc dot gnu.org
2020-10-28  9:16 ` jakub at gcc dot gnu.org
2020-10-28  9:58 ` jakub at gcc dot gnu.org
2020-10-28 10:00 ` rguenth at gcc dot gnu.org
2020-11-14  8:15 ` cvs-commit at gcc dot gnu.org
2020-11-25 11:56 ` cvs-commit at gcc dot gnu.org
2020-11-25 17:18 ` [Bug debug/97599] [8/9 " jakub at gcc dot gnu.org
2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:48 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:07 ` jakub at gcc dot gnu.org

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=bug-97599-4-rYcavZNSda@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).