Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 1995 15:25:00 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        gpalmer@westhill.cdrom.com
Cc:        terry@lambert.org, hlew@genome.Stanford.EDU, questions@FreeBSD.org
Subject:   Re: undump program
Message-ID:  <199512182225.PAA12810@phaeton.artisoft.com>
In-Reply-To: <952.819322668@westhill.cdrom.com> from "gpalmer@westhill.cdrom.com" at Dec 18, 95 01:37:48 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > What is it you want?  Checkpoint/restart?  There are packages for
> > that, but they certainly don't involve undumping core files.
> 
> Check SunOS... there is an undump type program (forget it's name)
> which allows you to take something like perl or (AFAIR) smalltalk, and
> run them with a piece of code to compile. Once compiled, the compiled
> code calls a fn which causes a core dump. You can then undump this to
> get the ``pre-compiled'' version of the code.

You mean the interpreter with the preloaded data for a particular
program instead of its default (zeroed and agregate initialized)
data.

Which is a far cry from a real binary for something.  It's a binary
for the interpreted version of the thing, with a different initialized
data set than from the compile.  The original collosal cave did this
to "copy protect" it.

> If memory serves, this is how LaTeX for SPARC is produced (you run TeX
> with latex.tex loaded or whatever, and then dump it).

As long as you understand that this is not a mechanism for doing a
checkpoint/restart, fine.  Typically it is very specific to the
core dump (^\) signal handling function and the dum occuring after
a flag is set in the handler to tell it to not reenter (since the
PC for the program  at the time of the dump will be in the handler).

This is inferior to writing real code, and is only a teeny savings
over resetting the interpreter state to the base level and doing
the restart to get the state back to the undump'ed "ground state".

I would not expect it to successfully remap shared libraries without
a hell of a lot of effort.


I have seen several programs in com.source.unix and a modified one for
emacs float by on the hackers list.  You should check there.


This is not typically something which people would want to do.

In fact, it's a silly thing to want to do in all but a few cases, and
in those cases, a checkpoint/restart mechanis, is probably superior.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512182225.PAA12810>