Virtual machines
BostonU SysMgr
root%bostonu.csnet at csnet-relay.arpa
Thu Jan 10 07:12:29 AEST 1985
> 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.
More information about the Comp.unix.wizards
mailing list