Sun 4 (Sparc) set/longjmp
Seth Robertson
seth at ctr.columbia.edu
Sun Dec 10 01:12:05 AEST 1989
My problem is this:
setjmp does not save all of the register during a longjmp.
Specifically, it does not save the frame pointer (register i6).
So when I try to do a longjmp from a signal handler running off of a
signal stack it barfs. (I restore a previous stack over the old stack
in the signal handler)
The Sun manual says:
"longjmp uses ST_FLUSH_WINDOWS to save the current register windows on
the current stack and to ensure that the registers of the context it
is jumping to are on the stack and not in the register windows. Any
software that switches the stack must do the same"
So my question is how can I do this in a C program? (perhaps using an
assembler routine?)
(In case anyone cares, I am using this in a checkpoint/restore
routine. The program works perfectly on a Sun 3, it just has trouble
because a Sun 4 setjmp doesn't save all registers)
-Seth Robertson
seth at ctr.columbia.edu
More information about the Comp.unix.wizards
mailing list