[parisc-linux] Program counter from sigcontext, constructurs and -fPIC

Grant Grundler grundler@parisc-linux.org
Wed, 30 Apr 2003 22:09:31 -0600


On Tue, Apr 29, 2003 at 02:17:32PM -0700, Boehm, Hans wrote:
> 3) Adding 24 bytes to the struct sigcontext pointer (?) passed
>    as a third argument to the signal handler. (!)
...
> Is the third argument to a signal handler really not a pointer to sigcontext?

Yes - that seems to be the case.
Randolph found most of the answer in "Single Unix Specification"
(IEEE 1033.1-2001).  Third argument is "ucontext_t".

We counted 20 bytes (not 24) before the "struct sigcontext uc_mcontext;"
and thus still don't have a full explanation. Our best guess is some
misc padding is involved.

hth,
grant