Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: net.lang.c Subject: Re: setjmp/longjmp Message-ID: <3092@alice.UUCP> Date: Sat, 10-Nov-84 11:34:34 EST Article-I.D.: alice.3092 Posted: Sat Nov 10 11:34:34 1984 Date-Received: Mon, 12-Nov-84 10:15:39 EST References: <4600@utzoo.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 10 Suppose you could arrange for a sorted table that contained triples: (routine start addr, routine end addr, register mask). You might need to make special provisions in the linker for this. While you're at it, make the linker sort the table and store the table start and end addresses in some canonical place. Then, as longjmp unwinds the stack, it can use the return address from each stack frame to do a binary search in this table to figure out what registers to restore.