[m-dev.] complex signal handlers

Peter Wang novalazy at gmail.com
Mon Oct 12 17:01:03 AEDT 2020


On Mon, 12 Oct 2020 12:57:44 +1100 Peter Wang <novalazy at gmail.com> wrote:
> 
> After sigcontext_struct we try to use siginfo_t. In that case, we try to
> pick out the program counter from the context argument passed to the
> signal handler using one of these methods:
> 
>   - context->uc_mcontext.gregs[REG_PC]
>   - context->uc_mcontext.gregs[CTX_EPC]
>     I can't find REG_PC nor CTX_EPC in any header across a bunch of
>     Linux distributions I have unpacked. The original code was written
>     in 1995 or earlier...

Ok, REG_PC is for SPARC and CTX_EPC is for MIPS.

Peter


More information about the developers mailing list