Xref: utzoo alt.sys.sun:298 comp.unix.wizards:19665 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!gem.mps.ohio-state.edu!ctrsol!seth From: seth@ctr.columbia.edu (Seth Robertson) Newsgroups: alt.sys.sun,comp.unix.wizards Subject: Sun 4 (Sparc) set/longjmp Summary: frame pointer is not saved Keywords: Sun4, longjmp, setjmp, frame pointer Message-ID: <1989Dec9.141205.10723@ctr.columbia.edu> Date: 9 Dec 89 14:12:05 GMT Reply-To: seth@ctr.columbia.edu (Seth Robertson) Organization: Columbia University Center for Telecommunications Research Lines: 26 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@ctr.columbia.edu