From: Roland McGrath <roland@hack.frob.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: Will Newton <will.newton@linaro.org>,
<libc-ports@sourceware.org>, <patches@linaro.org>
Subject: Re: [PATCH] ARM: Add SystemTap probes to longjmp and setjmp.
Date: Tue, 28 Jan 2014 22:03:00 -0000 [thread overview]
Message-ID: <20140128220307.9F62D74438@topped-with-meat.com> (raw)
In-Reply-To: Joseph S. Myers's message of Tuesday, 28 January 2014 21:35:02 +0000 <Pine.LNX.4.64.1401282129590.2449@digraph.polyomino.org.uk>
> On Mon, 27 Jan 2014, Will Newton wrote:
>
> > @@ -50,6 +48,11 @@ ENTRY (__longjmp)
> > ldr sp, [ip], #4
> > ldr lr, [ip], #4
> > #endif
> > + /* longjmp probe expects longjmp first argument (4@r0), second
> > + argument (-4@r1), and target address (4@r14), respectively. */
> > + LIBC_PROBE (longjmp, 3, 4@r0, -4@r1, 4@r14)
>
> The discussion on libc-alpha said this probe should be before unwinding;
> shouldn't that mean before sp and lr are restored, so that at probe time
> it's still possible to unwind through the caller of longjmp?
Yes, the longjmp probe is conceptually "at entry to longjmp". So it needs
to be just far enough in that you have demangled the pointers to make them
available as the probe's arguments. The longmp_target probe is the one
that should be as late as possible, so all the registers except the PC
itself (or as close as the particular machine's implementation makes
possible) reflect the state being restored.
next prev parent reply other threads:[~2014-01-28 22:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 9:37 Will Newton
2014-01-27 18:22 ` Joseph S. Myers
2014-01-27 20:51 ` Will Newton
2014-01-27 22:25 ` Joseph S. Myers
2014-01-28 21:35 ` Joseph S. Myers
2014-01-28 22:03 ` Roland McGrath [this message]
2014-01-29 10:15 ` Will Newton
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=20140128220307.9F62D74438@topped-with-meat.com \
--to=roland@hack.frob.com \
--cc=joseph@codesourcery.com \
--cc=libc-ports@sourceware.org \
--cc=patches@linaro.org \
--cc=will.newton@linaro.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).