From: Carlos O'Donell <carlos@redhat.com>
To: Michael Matz <matz@suse.de>, Florian Weimer <fweimer@redhat.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>, gnu-gabi@sourceware.org
Subject: Re: [PATCH] Make _Unwind_GetIPInfo part of the ABI
Date: Fri, 01 Jan 2016 00:00:00 -0000 [thread overview]
Message-ID: <bceb2f19-8b89-bb3e-1301-f22c7838c8f8@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.20.1610211546460.5714@wotan.suse.de>
On 10/21/2016 09:48 AM, Michael Matz wrote:
> Hi,
>
> On Fri, 21 Oct 2016, Michael Matz wrote:
>
>>> On 10/21/2016 02:58 PM, Michael Matz wrote:
>>>> +This function returns the same value as \code{\_Unwind\_GetIP}. In
>>>> +addition, the argument \code{ip\_before\_insn} must not be not null, and
>>>> +\code{*ip\_before\_insn} is updated with a flag which indicates whether
>>>> +the returned pointer is at or after the first not yet fully executed
>>>> +instruction.
>>>
>>> I think this is rather misleading. On x86_64, the location of the IP
>>> value is the same for calls and asynchronous signals: it always points
>>> to the next instruction to be executed.
>>
>> No, that's simply wrong.
>
> Or rather, it isn't wrong, it's indeed pointing to the instruction to be
> executed next after return from handler, as always. But that's not the
> important thing for unwinding: what you're interested in is the
> instruction that _caused_ the interruption, and for that what I said
> applies.
When you say "after the first not yet fully executed instruction" do you mean
"immediately after" or "some time after?"
On 32-bit hppa there is a delayed branch slot which means that after a call you are
two instructions past the call.
On 32-bit ARM you also have IP being two instructions beyond the call at any point
in time due to pipelining.
This would also mean the current code in gcc/libgcc/unwind-c.c needs to have a
target hook for it to be right?
--
Cheers,
Carlos.
prev parent reply other threads:[~2016-10-21 18:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-01 0:00 Florian Weimer
2016-01-01 0:00 ` Michael Matz
2016-01-01 0:00 ` Florian Weimer
2016-01-01 0:00 ` Michael Matz
2016-01-01 0:00 ` Florian Weimer
2016-01-01 0:00 ` H.J. Lu
2016-01-01 0:00 ` Florian Weimer
2016-01-01 0:00 ` Michael Matz
2016-01-01 0:00 ` Carlos O'Donell [this message]
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=bceb2f19-8b89-bb3e-1301-f22c7838c8f8@redhat.com \
--to=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=gnu-gabi@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=matz@suse.de \
/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).