Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!yamo@ames-nas.arpa From: yamo@ames-nas.arpa (Michael J. Yamasaki) Newsgroups: net.unix-wizards Subject: Re: Process Execution with Non-Standard Entry Points Message-ID: <1867@brl-tgr.ARPA> Date: Thu, 23-Jan-86 13:44:35 EST Article-I.D.: brl-tgr.1867 Posted: Thu Jan 23 13:44:35 1986 Date-Received: Sun, 26-Jan-86 04:47:35 EST Sender: news@brl-tgr.ARPA Lines: 26 >In article <122@linus.UUCP> jth@linus.UUCP (Joseph T. Healey) writes: >>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 success- >>fully copied the state of the text, data and stack segments and constructed a >>new a.out header specifying a new entry point (a_entry). >> >>The program calls a function upon receiving a SIGINT signal and sets the >>new (desired) entry point from the saved PC on the stack, however when I try >>to run the new program it always segmentation faults. I can specify any >>function address in the program as the entry point and the program can be >>successfully run. >> >>I am assuming the since I am trying to start at the saved PC instruction that >>it should be on a correct instruction address. Does anyone have any ideas >>about how I can start the execution of a program at an instruction other >>than a function address?? Any insight at all would be appreciated. I missed the original article, but ... It seems that what you might be interested in is ptrace(2). It is used for the implementation of breakpoint debugging (check out adb, sdb, dbx sources). Enjoy. -Yamo-