From owner-freebsd-questions Mon Dec 18 13:45:32 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA21577 for questions-outgoing; Mon, 18 Dec 1995 13:45:32 -0800 (PST) Received: from gw0.telebase.com (root@gw0.telebase.com [192.132.57.100]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id NAA21572 for ; Mon, 18 Dec 1995 13:45:28 -0800 (PST) Received: from wormhole.telebase.com by gw0.telebase.com id RAA14532 for ; Mon, 18 Dec 1995 17:40:32 -0500 (EST) Received: from odo.telebase.com (root@odo.telebase.com [172.16.2.217]) by wormhole.telebase.com (8.7.1/8.6.9.1) with ESMTP id RAA01986 for ; Mon, 18 Dec 1995 17:19:01 -0500 (EST) Received: (from bmc@localhost) by odo.telebase.com (8.7.1/8.6.9.1) id QAA07575; Mon, 18 Dec 1995 16:47:52 -0500 (EST) Date: Mon, 18 Dec 1995 16:47:52 -0500 (EST) From: Brian Clapper Message-Id: <199512182147.QAA07575@telebase.com.> To: questions@freebsd.org Subject: Re: undump program Sender: owner-questions@freebsd.org Precedence: bulk Howard Lew 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