Re: ocamldebug must not be stripped!

From: Xavier Leroy (Xavier.Leroy@inria.fr)
Date: Thu Jun 25 1998 - 11:43:09 MET DST


Date: Thu, 25 Jun 1998 11:43:09 +0200
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Markus Mottl <mottl@miss.wu-wien.ac.at>, OCAML <caml-list@inria.fr>
Subject: Re: ocamldebug must not be stripped!
In-Reply-To: <199806220948.LAA28374@miss.wu-wien.ac.at>; from Markus Mottl on Mon, Jun 22, 1998 at 11:48:44AM +0100

> I have just found out that "ocamldebug" itself must not be stripped in
> order to work (at least under i686 - Linux 2.0.30 and Alpha - Digital
> Unix 4.0d). I didn't find this anywhere in the documentation.
> Does "ocamldebug" really need its own debug information or is this a bug?
> It will probably need it in any case... ;-)
>
> Do the other programs need their debug information? Until now I have
> not encountered any problems, but who knows...

All executables generated by "ocamlc -custom" must not be stripped.

The reason is that they are composed of a C executable (the custom
runtime system) concatenated with the OCaml bytecode for the program.
The C executable looks at "itself" (the file it comes from) to load
the bytecode.

"strip" on most Unix machines just discards the C debugging
information as well as everything that follows it, thus discarding the
bytecode as well.

ocamldebug is just an instance of the general case, since it is
produced by "ocamlc -custom".

- Xavier Leroy



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:14 MET