* Re: ocamldebug must not be stripped! [not found] <13711.22440.102506.717388@pc84.lri.fr> @ 1998-06-24 16:49 ` Markus Mottl 0 siblings, 0 replies; 3+ messages in thread From: Markus Mottl @ 1998-06-24 16:49 UTC (permalink / raw) To: Patrick Loiseleur; +Cc: monniaux, caml-list Bonjour - Hello, english version --------------- Ah, I see... The only program of the ocaml-distribution compiled to bytecode even if native code is desired is the debugger! I didn't know this... [from Patrick.Loiseleur@lri.fr] > However, it must be possible to modify the Makefile in order > to compile it in native code. Or is it a special reason that makes > compilation of ocamldebug in native code not possible ? Although it is probably not necessary to compile the debugger in native code (it is fast enough, I think), I had a look on that, but did not succeed to link everything after having manipulated the Makefile: I replaced all occurrences of ".cmo" by ".cmx", ".cma" by ".cmxa" and added some object files, that implement otherwise missing symbols, to the linking process: ../byterun/meta.o ../byterun/stacks.o ../byterun/fix_code.o ../byterun/prims.o ../byterun/debugger.o ../byterun/array.o ../byterun/fail.o Unfortunately, the files "fail.o" and "array.o" contain some symbols that also exist in "libasmrun.a", which is implicitly linked against the executable. I thought, it would not be very wise to hack any further into the build process of the debugger, since I am content with the debugger anyway... version francaise(?) -------------------- Ah, je comprends... Seulement le debugger est compilé en "bytecode", même si on demande code natif! Je ne l'ai pas su... [de Patrick.Loiseleur@lri.fr] > A moins d'une raison particulière (mais laquelle) je pense qu'il est > possible de compiler ce programme en natif si on le désire. Je ne pense pas qu'il soit nécessaire de compiler le debugger en natif (il est assez vite), mais je l'ai essayé (sans succès): J'ai remplacé ".cmo" par ".cmx", ".cma" par ".cmxa" au "Makefile" et j'ai ajouté les fichiers suivants (ils contiennent des symbols nécessaires) pour "linkage": ../byterun/meta.o ../byterun/stacks.o ../byterun/fix_code.o ../byterun/prims.o ../byterun/debugger.o ../byterun/array.o ../byterun/fail.o Malheuresement, les fichiers "fail.o" et "array.o" contiennent quelques symbols qui aussi existent en "libasmrun.a", qui est implicitement utilisé pendant "linkage". Je n'ai pas continué á chercher une solution - je n'ai pas besoin d'un debugger plus vite... Best regards - bien amicalement, Markus -- * Markus Mottl | University of Economics and * * Department of Applied | Business Administration * * Computer Science | Vienna, Austria * * mottl@miss.wu-wien.ac.at | http://miss.wu-wien.ac.at/~mottl * ^ permalink raw reply [flat|nested] 3+ messages in thread
* ocamldebug must not be stripped! @ 1998-06-22 10:48 Markus Mottl 1998-06-25 9:43 ` Xavier Leroy 0 siblings, 1 reply; 3+ messages in thread From: Markus Mottl @ 1998-06-22 10:48 UTC (permalink / raw) To: OCAML Bonjour - Hello, L'executable "ocamldebug" (version 1.07) ne marche pas s'il est "stripé" (? :-) ) 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... Amicalement - Best regards, Markus Mottl -- * Markus Mottl | University of Economics and * * Department of Applied | Business Administration * * Computer Science | Vienna, Austria * * mottl@miss.wu-wien.ac.at | http://miss.wu-wien.ac.at/~mottl * ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ocamldebug must not be stripped! 1998-06-22 10:48 Markus Mottl @ 1998-06-25 9:43 ` Xavier Leroy 0 siblings, 0 replies; 3+ messages in thread From: Xavier Leroy @ 1998-06-25 9:43 UTC (permalink / raw) To: Markus Mottl, OCAML > 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-06-25 23:27 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <13711.22440.102506.717388@pc84.lri.fr> 1998-06-24 16:49 ` ocamldebug must not be stripped! Markus Mottl 1998-06-22 10:48 Markus Mottl 1998-06-25 9:43 ` Xavier Leroy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox