From: Richard Biener <rguenther@suse.de>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Jakub Jelinek <jakub@redhat.com>,
Alexandre Oliva <oliva@adacore.com>
Subject: Re: [PATCH] Add line debug info for virtual thunks (PR ipa/97937)
Date: Tue, 5 Jan 2021 13:26:39 +0100 (CET) [thread overview]
Message-ID: <nycvar.YFH.7.76.2101051322560.17979@zhemvz.fhfr.qr> (raw)
In-Reply-To: <AM0PR0602MB34107607C2FC922F18F7AB34E4D20@AM0PR0602MB3410.eurprd06.prod.outlook.com>
On Mon, 4 Jan 2021, Bernd Edlinger wrote:
> Hi,
>
>
> currently there is a problem when debugging a virtual thunk. That is
> a decl with DECL_IGNORED_P. Currently the line information displayed
> in gdb is completely bogus, thus the last line of whatever function
> is immediately before the PC of the thunk.
But isn't this a consumer issue then? If there is no line info for
a PC range then gdb shouldn't display any.
> This patch improves the debug experience at least a bit by emitting
> at the line number information where the thunk has been defined.
> I do not dare to touch anything but dwarf2 debug info, therefore
> the patch is a bit awkward.
There's more DECL_IGNORED_P decls (like functions emitted by
profile instrumentation), which do not have any source correspondence.
So IMHO the fix should be to make a more nuanced DECL_IGNORED_P
for thunks if it is really necessary to emit debug info for them.
For example by making them DECL_ARTIFICIAL only (not sure why
we end up with them DECL_IGNORED_P - there might be a reason).
Richard.
>
> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> Is it OK for trunk?
>
>
> Thanks
> Bernd.
>
--
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)
next prev parent reply other threads:[~2021-01-05 12:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-04 20:06 Bernd Edlinger
2021-01-04 21:45 ` Jeff Law
2021-01-06 7:52 ` Bernd Edlinger
2021-01-05 12:26 ` Richard Biener [this message]
2021-01-06 7:01 ` Alexandre Oliva
2021-01-06 7:36 ` Bernd Edlinger
2021-01-06 7:50 ` Richard Biener
2021-01-06 10:07 ` Jakub Jelinek
2021-01-07 7:27 ` Richard Biener
2021-01-05 13:09 ` Alexandre Oliva
2021-01-06 11:49 ` Eric Botcazou
2021-01-06 12:26 ` Bernd Edlinger
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=nycvar.YFH.7.76.2101051322560.17979@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=bernd.edlinger@hotmail.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=oliva@adacore.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).