English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
ocamldebug must not be stripped!
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1998-06-25 (23:27)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: ocamldebug must not be stripped!
> 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