public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/53927] wrong value for DW_AT_static_link
Date: Tue, 03 Mar 2015 11:03:00 -0000 [thread overview]
Message-ID: <bug-53927-4-123WYUhaQM@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53927-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927
--- Comment #18 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Jason suggested to change DW_AT_frame_base in order to make it equal to the
> address of the FRAME object. I was not sure:
>
> 1) how to do it: location descriptions for all local variables would need
> to be updated;
> 2) whether it's safe to do this: what if optimizers move/duplicate this
> FRAME object in the stack frame or do similar "disturbing" things? I'm not
> familiar enough with optimization passes to estimate if it's likely:
> feedback welcome. :-)
>
> I thought: why not make DW_AT_static_link compute the parent frame base
> address from the current static link argument? Well, when generating
> DW_AT_static_link for a nested subprogram, we do not know yet the offset
> between the FRAME object and the frame base address. This is because nested
> subprograms reach the back-end before their parent. Besides, see point 2:
> are we only sure that such a constant offset exists?
I think this is worth investigating though because it's conceptually much
simpler than adding yet another indirection. And we should concentrate on -O0
(and -Og), we don't really care about what happens with aggressive
optimization.
I guess the question is: can we arrange to have a constant offset between the
frame base and the FRAME object, "constant" meaning valid for every function
but possibly target-dependent?
next prev parent reply other threads:[~2015-03-03 11:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 13:20 [Bug debug/53927] New: " tromey at gcc dot gnu.org
2013-01-24 20:25 ` [Bug debug/53927] " tromey at gcc dot gnu.org
2013-01-31 15:01 ` ebotcazou at gcc dot gnu.org
2013-01-31 19:23 ` jason at gcc dot gnu.org
2013-01-31 19:40 ` tromey at gcc dot gnu.org
2013-01-31 20:12 ` jason at gcc dot gnu.org
2013-01-31 22:34 ` ebotcazou at gcc dot gnu.org
2013-01-31 23:23 ` jason at gcc dot gnu.org
2013-02-01 18:22 ` tromey at gcc dot gnu.org
2013-02-01 22:17 ` ebotcazou at gcc dot gnu.org
2013-02-01 22:21 ` ebotcazou at gcc dot gnu.org
2014-05-09 16:14 ` ebotcazou at gcc dot gnu.org
2014-06-06 8:14 ` ebotcazou at gcc dot gnu.org
2015-02-25 15:02 ` derodat at adacore dot com
2015-02-25 15:03 ` derodat at adacore dot com
2015-03-02 14:42 ` derodat at adacore dot com
2015-03-02 14:59 ` tromey at gcc dot gnu.org
2015-03-03 10:02 ` derodat at adacore dot com
2015-03-03 11:03 ` ebotcazou at gcc dot gnu.org [this message]
2015-03-03 15:13 ` tromey at gcc dot gnu.org
2015-03-09 15:56 ` derodat at adacore dot com
2015-03-10 9:41 ` ebotcazou 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-53927-4-123WYUhaQM@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).