Path: utzoo!attcan!uunet!mcvax!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.unix.questions Subject: Re: Core files ... it works Keywords: core data bss XINU, save/restore regs Message-ID: <551@philmds.UUCP> Date: 4 Jul 88 11:09:39 GMT References: <344@ajpo.sei.cmu.edu> <441@anagld.UUCP> <790@scubed.UUCP> <11954@mimsy.UUCP> <796@scubed.UUCP> <537@philmds.UUCP> <797@scubed.UUCP> <6053@megaron.arizona.edu> <496@muffin.cme-durer.ARPA> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 18 How about using setjmp() and longjmp()? Isn't that a - fairly - portable way to get/restores the registers? Something like: if (setjmp(&jpbf)) { /* save jmpbuf struct into data space of new executable */ } else { /* */ } When running the executable, do a longjmp using the saved struct. This can of course cause problems (longjmp complaining about an incorrect stack) on systems where longjmp does such checkings (did Chris not mention something like this in a recent posting?). Anyway, it was just an idea... Leo.