Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!cmcl2!philabs!micomvax!musocs!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP Newsgroups: net.unix-wizards Subject: Re: Process Execution with Non-Standard Entry Points Message-ID: <354@mcgill-vision.UUCP> Date: Sun, 26-Jan-86 19:15:53 EST Article-I.D.: mcgill-v.354 Posted: Sun Jan 26 19:15:53 1986 Date-Received: Fri, 31-Jan-86 23:43:41 EST References: <1867@brl-tgr.ARPA> Organization: McGill University, Montreal Lines: 37 key: > yamo@ames-nas.arpa (Michael J. Yamasaki) >>> yamo attributes to jth@linus.UUCP (Joseph T. Healey) >>> I am interested in taking a "snapshot" of a running process, >>> stopping execution and then resuming execution at the instruction >>> after the stop. I have successfully [ attempted to build a new >>> a.out ] >>> [ but the new a.out segmentation faults ] > > I missed the original article, but ... I'm afraid I did too. Miss the original, that is. But the request seems clear enough. > It seems that what you might be interested in is ptrace(2). Ptrace might be used to do this, but it can get awkward. I put this in our kernel; it isn't very difficult (4.2bsd) if you have kernel source. Unfortunately, you cannot have ANY files open at the time you make the dump (open files looked like too much of a headache to save the state of, so I let the programmer worry about closing and re-opening files). It works OK; people here use it as a checkpoint mechanism for programs which take cpu-hours or cpu-days. If anyone out there is interested, mail me (see the .signature below) and I can give you details, or if you have a source license we can work out something for getting you the code. -- der Mouse USA: {ihnp4,decvax,akgua,etc}!utcsri!mcgill-vision!mouse philabs!micomvax!musocs!mcgill-vision!mouse Europe: mcvax!decvax!utcsri!mcgill-vision!mouse mcvax!seismo!cmcl2!philabs!micomvax!musocs!mcgill-vision!mouse Hacker: One who accidentally destroys / Wizard: One who recovers it afterward