| Anonymous | Login | Signup for a new account | 2013-05-23 15:29 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0000165 | OCaml | OCaml general | public | 2000-07-23 00:10 | 2000-07-27 13:34 | |||
| Reporter | administrator | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0000165: Re: a few practical details | |||||||
| Description | Hi, Thank you for your message to the Caml mailing list. However your message seems to be a bug report; hence I send it to the relevant mailing list caml-bugs@inria.fr Thank again for your interest in Caml. Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/ [^] > - ocamldebug uses $PATH to find the prog to debug. This is quite annoying if you > don't have ``.'' in your path (as it should be :) you get: > > % ocamldebug best > Objective Caml Debugger version 3.00 > > (ocd) run > Loading program... Program not found. > (ocd) > > > i must not be the first to be annoyed by this... > > As for now, i just patched camldebug.el to workaround this (as anyway, > ocamldebug can't be used standalone on command line with no readline! By the way > what about adding readline support to ocaml and ocamldebug?) > > > - could it be added to the documentation that ocamldebug and ocamlbrowser should > *not* be stripped, unless they don't work the way they should (the worse is > maybe that they work just like ocamlrun, making you go crazy trying to find out > what the hell is going on, moreover together with the PATH pb!) > > - are there any good solutions to debug tk-enabled programs? As for now, i > managed it by adding the different librairies i'm using to compilation of > ocamldebug, need the source at hand though. The second problem is of course that > back debugging doesn't work (you get Xlib: unexpected async reply (sequence > 0x6a8)!), so sad when you're already addicted to it! > > - lastly, a bug (is it?) on axp: > > >> pixel@alpha:~>ocaml > >> Objective Caml version 3.00 > >> > >> # 1.0 /. 0. ;; > >> zsh: floating point exception ocaml > > whereas on ix86 & sparc it gives: > > >> pixel@leia:~>ocaml > >> Objective Caml version 3.00 > >> > >> # 1.0 /. 0.0 ;; > >> - : float = inf > > > Thanks, cu Pixel. > > > > diff -r -u -N ocaml-3.00.old/emacs/camldebug.el ocaml-3.00/emacs/camldebug.el > --- ocaml-3.00.old/emacs/camldebug.el Wed Apr 5 20:30:14 2000 > +++ ocaml-3.00/emacs/camldebug.el Sat Jul 22 17:51:02 2000 > @@ -480,7 +480,7 @@ > (make-comint (concat "camldebug-" file) > (substitute-in-file-name camldebug-command-name) > nil > - "-emacs" "-cd" default-directory file) > + "-emacs" "-cd" default-directory (concat "./" file)) > (set-process-filter (get-buffer-process (current-buffer)) > 'camldebug-filter) > (set-process-sentinel (get-buffer-process (current-buffer)) | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0000422) administrator (administrator) 2000-07-25 18:40 |
> - ocamldebug uses $PATH to find the prog to debug. This is quite > annoying if you don't have ``.'' in your path (as it should be :) Yes, that was silly. It's fixed in the working sources. > As for now, i just patched camldebug.el to workaround this (as > anyway, ocamldebug can't be used standalone on command line with no > readline! By the way what about adding readline support to ocaml and > ocamldebug?) Initially, we hoped that an external line editor such as Ledit could be used. However, external line editors aren't widespread nowadays. > - could it be added to the documentation that ocamldebug and > ocamlbrowser should *not* be stripped, unless they don't work the > way they should (the worse is maybe that they work just like > ocamlrun, making you go crazy trying to find out what the hell is > going on, moreover together with the PATH pb!) Right. All programs compiled with "ocamlc -custom" must not be stripped. This is mentioned in the docs, but the installation instructions should also say it for ocamldebug and ocamlbrowser. > - are there any good solutions to debug tk-enabled programs? As for > now, i managed it by adding the different librairies i'm using to > compilation of ocamldebug, need the source at hand though. The > second problem is of course that back debugging doesn't work (you > get Xlib: unexpected async reply (sequence 0x6a8)!), so sad when > you're already addicted to it! Right. I'm afraid reverse execution will never work for programs that do I/O, especially socket I/O, and especially socket I/O done in an external C library... > - lastly, a bug (is it?) on axp: > > >> pixel@alpha:~>ocaml > >> Objective Caml version 3.00 > >> > >> # 1.0 /. 0. ;; > >> zsh: floating point exception ocaml > > whereas on ix86 & sparc it gives: > > >> pixel@leia:~>ocaml > >> Objective Caml version 3.00 > >> > >> # 1.0 /. 0.0 ;; > >> - : float = inf Well, you'd get the same floating-point exception on an Alpha with a C program. The Alpha processor doesn't implement all of IEEE arithmetic in hardware, in particular the treatment of infinities. Since the OCaml virtual machine is in C, you get the same behavior in OCaml. This said, there are special flags to the C compiler that allow full IEEE support via software assistance (-mieee? -fieee? can't remember). I think we should activate those flags when compiling the bytecode interpreter, at least. (The native-code compiler is another story.) Thanks for your feedback, - Xavier Leroy |
|
(0000423) administrator (administrator) 2000-07-26 00:16 |
Xavier Leroy <Xavier.Leroy@inria.fr> writes: [...] > > - could it be added to the documentation that ocamldebug and > > ocamlbrowser should *not* be stripped, unless they don't work the > > way they should (the worse is maybe that they work just like > > ocamlrun, making you go crazy trying to find out what the hell is > > going on, moreover together with the PATH pb!) > > Right. All programs compiled with "ocamlc -custom" must not be > stripped. This is mentioned in the docs, but the installation > instructions should also say it for ocamldebug and ocamlbrowser. ?? i've done a "grep -r -i strip ." in the ocaml source directory and didn't find any mention about this [...] > > >> pixel@alpha:~>ocaml > > >> Objective Caml version 3.00 > > >> > > >> # 1.0 /. 0. ;; > > >> zsh: floating point exception ocaml [...] > Well, you'd get the same floating-point exception on an Alpha with a C > program. The Alpha processor doesn't implement all of IEEE arithmetic > in hardware, in particular the treatment of infinities. Since the > OCaml virtual machine is in C, you get the same behavior in OCaml. > > This said, there are special flags to the C compiler that allow full > IEEE support via software assistance (-mieee? -fieee? can't remember). ok, i've rebuilded ocaml with -mieee, and now it works nicely. the pb i have now is to have the native-code compiler work the same... pixel@alpha:/tmp>echo "1. /. 0." > t.ml ; ocamlc t.ml ; ./a.out pixel@alpha:/tmp>echo "1. /. 0." > t.ml ; ocamlopt t.ml ; ./a.out zsh: floating point exception ./a.out i've tried passing some -mieee to ocamlopt, but as ocamlopt generates assembler, i had no luck of course... as for now, i'll keep the bytecode version which works :) thanks, cu Pixel. |
|
(0000424) administrator (administrator) 2000-07-27 11:32 |
> > Right. All programs compiled with "ocamlc -custom" must not be > > stripped. This is mentioned in the docs, but the installation > > instructions should also say it for ocamldebug and ocamlbrowser. > > ?? i've done a "grep -r -i strip ." in the ocaml source directory and didn't > find any mention about this The manual is distributed separately from the sources. > ok, i've rebuilded ocaml with -mieee, and now it works nicely. > the pb i have now is to have the native-code compiler work the same... > i've tried passing some -mieee to ocamlopt, but as ocamlopt > generates assembler, i had no luck of course... Right. It would be necessary to modify the code generator, so that it generates enough hooks for the software fix-up code to work, and it's not obvious at all how to do it. - Xavier Leroy |
|
(0000425) administrator (administrator) 2000-07-27 13:20 |
> ?? i've done a "grep -r -i strip ." in the ocaml source directory and didn't > find any mention about this Sorry, I mis-remembered: the "strip" trap wasn't documented in the manual either. Now, it is. Thanks for your feedback. - Xavier Leroy |
|
(0000426) administrator (administrator) 2000-07-27 13:34 |
Debugger problem fixed some time ago. INSTALL file, docs, and Alpha compilation options fixed 2000-07-27 by XL. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| Copyright © 2000 - 2011 MantisBT Group |