[PATCH] Make _Unwind_GetIPInfo part of the ABI

Florian Weimer fweimer@redhat.com
Fri Jan 1 00:00:00 GMT 2016


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.  There are no partially executed 
instructions.

The difference that if we unwind through a call which has not yet 
returned, the caller is assumed to be still within the exception 
handling region in which the call instruction is located.  This is the 
consequence of the desired exception handling semantics of a 
non-returned function call.  It is not directly related to the 
instruction pointer value returned by _Unwind_GetIPInfo.

This is different for the signal case.  There, the instruction pointer 
directly determines the active exception handling region.

Florian



More information about the Gnu-gabi mailing list