Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!teddy!panda!talcott!harvard!seismo!brl-tgr!tgr!root%bostonu.csnet@csnet-relay.arpa
From: BostonU SysMgr 
Newsgroups: net.unix-wizards
Subject: Re: Virtual machines
Message-ID: <7152@brl-tgr.ARPA>
Date: Wed, 9-Jan-85 16:12:29 EST
Article-I.D.: brl-tgr.7152
Posted: Wed Jan  9 16:12:29 1985
Date-Received: Sat, 12-Jan-85 06:47:01 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 34


> In fact, certain large programs depended on this -- after compiling one
> of them you would run it one time so it could build its symbol tables (or
> whatever), then it changed its starting address and exited so you could save
> it with the startup code already done (a trick "ps" could use, no doubt!).

	We were distributed with our laser printer software a
	UNIX (4.2 dependent probably) program called 'undump.c'
	What it seems to do quite reliably is take a 'core'
	and turn it back into an a.out which will start up as
	it was at the time of the core dump (eg. after a SIGQUIT.)

	I tried it on our EMACS and it almost works. EMACS certainly
	starts up in the state it was dumped (EMACS goes through
	a long, complicated and very necessary init phase.) The
	obvious problem (here's the rub!) is that it won't re-read
	the command line (argc,argv). OBVIOUSLY! Oh well, TOPS-20
	always had this feature but programs often need to be
	written to sense that they have been re-started so they
	at least do a little re-init, like re-reading the command line.
	The only programs that could likely work as is are those
	that immediately sit in a read-eval loop at the terminal
	rather than reading the command line (LISP comes to mind.)
	[ok, not that LISP doesn't read the cmd line, just that you
	could immediately after re-starting do whatever might have
	been done via the command line. Editors generally have this
	property (Visit File or :e or whatever.(]

		-Barry Shein, Boston University

	P.S. undump.c may very well have come off of some public
	domain source. If anyone knows I would be glad to re-distribute.
	If you just ask me for it I'll try to check into it myself,
	maybe there's a comment somewhere.