[comp.unix.aux] Stack contents for signal handler

davism@creatures.cs.vt.edu (Mat Davis) (08/16/90)

For various reasons, I'd like to be able to determine the saved PC value
from within a signal handler under A/UX.  From what I can tell, though, that
information doesn't appear to be on the user stack.  There are 20-30 long
words on the stack between the context of the interrupted routine and the
handler's context, but none of those are the return address.

Is it possible to access or modify the saved PC?

(BTW, the *only* reason that I'd ever want to modify the saved PC is for 
porting MacXINU to run under 2.0.  XINU wants to use something like a signal
handler to do process preemption, and when a process gets preempted the
return address should be changed to a different (XINU) process's context.
If I managed to get that even partially clear!! :-)

-------------------------------------------------------------------------------
                      Mat Davis (davism@vtopus.cs.vt.edu)
                 Department of Computer Science, Virginia Tech
-------------------------------------------------------------------------------