Date: Mon, 18 Dec 1995 16:47:52 -0500 (EST) From: Brian Clapper <bmc@telebase.com> To: questions@freebsd.org Subject: Re: undump program Message-ID: <199512182147.QAA07575@telebase.com.>
next in thread | raw e-mail | index | archive | help
Howard Lew <hlew@genome.Stanford.EDU> writes:
> On Mon, 18 Dec 1995, Terry Lambert wrote:
>
> > > Hey guys!
> > >
> > > Is there an "undump" program to turn a core dump into an executable binary?
> >
> > It would be trivial to write.
> >
> > Why do you want an executable binary whose first act will be to core
> > dump again? Can't you just copy the core file to the new location? 8-).
> >
> >
> > Terry Lambert
> > terry@lambert.org
>
> Actually, I think a better question would be.... Is there an undump
> program to take a core dump and run it?
None of this amusing exchange, of course, answers the original question.
Personally, I like Terry Lambert's suggestion best :-) However, I think the
original question referred to something more along the following lines.
Excerpt from the FreeBSD perlrun(1) man page:
-u causes Perl to dump core after compiling your script. You can
then take this core dump and turn it into an executable file by
using the undump program (not supplied). This speeds startup
at the expense of some disk space (which you can minimize by
stripping the executable). (Still, a "hello world" executable
comes out to about 200K on my machine.) If you want to execute
a portion of your script before dumping, use the dump()
operator instead. Note: availability of undump is platform
specific and may not be available for a specific port of Perl.
I found the following information at
http://ancho.ucs.indiana.edu/FAQ/Perl/P3.11.html
3.11) What is undump and where can I get it?
The undump program comes from the TeX distribution. If you have
TeX, then you may have a working undump. If you don't, and you
can't get one, *AND* you have a GNU emacs working on your machine
that can clone itself, then you might try taking its unexec()
function and compiling Perl with -DUNEXEC, which will make Perl
call unexec() instead of abort(). You'll have to add unexec.o to
the objects line in the Makefile. If you succeed, post to
comp.lang.perl about your experience so others can benefit from it.
If you have a version of undump that works with Perl, please submit
its anon-FTP whereabouts to the FAQ maintainer.
I don't know how recent that information is.
There's unsupported source in "http://www.cdrom.com/pub/perl/util/undump/".
Whether it'll work on FreeBSD is a question for someone more knowledgeable
than I.
----
Brian Clapper, bmc@telebase.com, http://www.netaxs.com/~bmc/
There are two ways of constructing a software design. One way is to make
it so simple that there are obviously no deficiencies and the other is to
make it so complicated that there are no obvious deficiencies.
-- C. A. R. Hoare
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512182147.QAA07575>
