Version française
Home     About     Download     Resources     Contact us    
Browse thread
debugging in toplevel
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <gerd@g...>
Subject: Re: [Caml-list] debugging in toplevel

Am Mittwoch, den 10.02.2010, 22:37 +0100 schrieb Guillaume Yziquel:
> Hi.
> 
> I've been working on Yoann Padioleau's version of ocaml-python bindings.
> 
> I unfortunately get the following error:
> 
> > yziquel@seldon:~$ ocaml
> >         Objective Caml version 3.11.1
> > 
> > # #use "topfind";;
> > - : unit = ()
> > Findlib has been successfully loaded. Additional directives:
> >   #require "package";;      to load a package
> >   #list;;                   to list the available packages
> >   #camlp4o;;                to load camlp4 (standard syntax)
> >   #camlp4r;;                to load camlp4 (revised syntax)
> >   #predicates "p,q,...";;   to set these predicates
> >   Topfind.reset();;         to force that packages will be reloaded
> >   #thread;;                 to enable threads
> > 
> > - : unit = ()
> > # #require "python";;
> > /usr/lib/ocaml/unix.cma: loaded
> > /usr/lib/ocaml/str.cma: loaded
> > /usr/lib/ocaml/python: added to search path
> > /usr/lib/ocaml/python/pycaml.cma: loaded
> > Exception: Invalid_argument "index out of bounds".
> > # 

Looks like this happens in the initialization code for pycaml.cma.

> How do you debug something like this? ocamldebug and #trace do not seem 
> to be very useful. What would you recommend doing to debug this toplevel 
> error?

The toplevel is hard to debug. Try to reproduce without the toplevel.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Phone: +49-6151-153855                  Fax: +49-6151-997714
------------------------------------------------------------