Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] 3.07: debug information on camlp4-processed files is missing the file name?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] 3.07: debug information on camlp4-processed files is missing the file name?
On Thursday, January 8, 2004, at 09:17 AM, Stefano Zacchiroli wrote:

> Do this patch change also the output format of -dtypes option when used
> in combination with camlp4?

Yes.  It changes the annotations in the parse tree, which are used
for the debugger, the -dtypes option, error messages, backtrace, etc.

>  Actually while using camlp4, the .annot file
> generated uses offsets that are all referred to the beginning of file;
> while not using camlp4 offsets are referred to the beginning of each
> line.

The missing file name can be considered a bug.  Otherwise, there are
two possible formats: the old format (line 1, offset from the
beginning of the file) and the new format (line, character).  We are
working to get rid of the old format before the next release of
O'Caml.

> I'm asking because I've written vim support for .annot files, but
> actually it works only with non camlp4 generated .annot files ...

If possible, you shouldn't count on the line number to be exact.
Start at the beginning of the line, and go forward the given number
of characters.  Most of the time, you won't encounter any line break,
but that's not strongly guaranteed.

-- Damien

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners