From: Samuel Bronson <naesten@gmail.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: tromey@redhat.com, gdb-patches@sourceware.org
Subject: Re: [FYI] Inlining support, rough patch
Date: Sat, 20 Jun 2009 19:28:00 -0000 [thread overview]
Message-ID: <87k536zow5.wl%naesten@gmail.com> (raw)
In-Reply-To: <200906200956.n5K9ueuN029061@brahms.sibelius.xs4all.nl>
At Sat, 20 Jun 2009 11:56:40 +0200 (CEST),
Mark Kettenis wrote:
>
> > From: Tom Tromey <tromey@redhat.com>
> > Date: Thu, 18 Jun 2009 11:55:42 -0600
> >
> > Ping.
> >
> > Mark> I firmly believe that if we want to add the capability to unwind
> > Mark> through inlined functions, this fundamental principle should hold for
> > Mark> inlined functions as well. This means that if we can detect that the
> > Mark> current register state describes a process executing an inlined
> > Mark> function we should faithfully reconstruct the register state for the
> > Mark> call site of that inlined function. If I understand things correctly,
> > Mark> the DW_TAG_inlined_subroutine tag provides information about the call
> > Mark> site, which gives us the unwound program counter. But in order to
> > Mark> reconstruct the complete register state, we need more information.
> > Mark> The only viable source of that information is something like DWARF
> > Mark> CFI; you don't stand a chance of doing a proper job here by doing
> > Mark> instruction analysis.
> >
> > Daniel> DWARF CFI is not going to help with this; it only deals with 'real'
> > Daniel> (i.e. not inlined) functions. There's no saved register state
> > Daniel> from the virtual entry point. There isn't even an indicator
> > Daniel> of where inlining occurs. Are you suggesting enhancing
> > Daniel> the CFI information? I suspect the extra register state
> > Daniel> would be generally unretrievable.
FWIW, there is no "register state for the call site" of an inlined
function. The inlined function's variables compete for stack slots and
registers with those of the calling function, and their code may be
interspersed and re-ordered. The closest thing to "register state for
the call site" that exists in this context is, well, the same register
state as that seen in the inline function.
This doesn't have anything to do with limitations of the debug
information, either; the compiler could not have such a concept as
"register state for the call site" without seriously compromising
the benefits of doing the inlining in the first place.
> > It has been two months since this response. I think Daniel addressed
> > your objections, at least to the extent they are addressable given the
> > existing Dwarf specification.
> >
> > I would like it if this patch did not stay in limbo any longer. I
> > think that goes for others, too: according to Joel's summit notes,
> > this patch was explicitly asked about by attendees.
> >
> > At a minimum, could you answer his question above? Thanks.
>
> Sorry, I have been travelling for the last month. I still think the
> inline unwinder should not bend the rules we established for
> unwinders. But since I'm obviously not capable of coming up with a
> better way to do this, please use your own judgements about this diff.
next prev parent reply other threads:[~2009-06-20 19:28 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 19:39 Daniel Jacobowitz
2008-06-13 19:43 ` Daniel Jacobowitz
2008-06-23 12:03 ` Jan Kratochvil
2008-06-23 14:23 ` Daniel Jacobowitz
2008-07-02 19:15 ` Daniel Jacobowitz
2008-07-03 11:22 ` [FYI] Inlining support, rough patch [break-by-function-name] Jan Kratochvil
2008-07-03 16:01 ` Daniel Jacobowitz
2008-07-12 7:41 ` Jan Kratochvil
2008-07-08 0:12 ` [FYI] Inlining support, rough patch Daniel Jacobowitz
2008-07-15 19:21 ` Daniel Jacobowitz
2008-07-17 23:53 ` Mark Kettenis
2008-07-18 13:03 ` Daniel Jacobowitz
[not found] ` <200807251446.m6PEkfwc027635@brahms.sibelius.xs4all.nl>
2008-07-25 17:47 ` Daniel Jacobowitz
2009-03-31 3:06 ` Tom Tromey
2009-03-31 20:49 ` Mark Kettenis
2009-03-31 22:13 ` Daniel Jacobowitz
2009-04-20 15:49 ` Daniel Jacobowitz
2009-04-20 15:54 ` Jan Kratochvil
2009-06-27 18:01 ` Daniel Jacobowitz
2009-06-28 10:16 ` Jan Kratochvil
2009-06-28 13:35 ` Daniel Jacobowitz
2009-06-30 16:11 ` Tom Tromey
2009-06-30 16:50 ` Jan Kratochvil
2009-04-22 22:04 ` Mark Kettenis
2009-04-23 3:17 ` Eli Zaretskii
2009-04-23 5:56 ` Stan Shebs
2009-04-23 12:48 ` Daniel Jacobowitz
2009-06-18 17:55 ` Tom Tromey
2009-06-20 9:57 ` Mark Kettenis
2009-06-20 19:28 ` Samuel Bronson [this message]
2009-04-24 21:44 ` Thiago Jung Bauermann
2008-07-18 2:02 ` Paul Pluzhnikov
2008-07-18 3:07 ` Daniel Jacobowitz
2008-07-20 14:41 ` Eli Zaretskii
2008-07-25 13:54 ` Eli Zaretskii
2008-07-25 14:26 ` Daniel Jacobowitz
2008-07-25 16:11 ` Daniel Jacobowitz
2008-07-26 5:58 ` Eli Zaretskii
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=87k536zow5.wl%naesten@gmail.com \
--to=naesten@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=tromey@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