Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
backtrace output: feature request
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-22 (14:35)
From: Sam Steingold <sds@g...>
Subject: Re: [Caml-list] backtrace output: feature request
> * Xavier Leroy <> [2007-04-22 12:10:57 +0200]:
>> how do I get backtraces on exceptions in then top-level?
>> I want to see something like:
>> h called g on line 1
>> g called f on line 1
>> f raised invalid_argument on line 1
> Currently, you cannot.  Conceivably, this would be the same mechanism
> as outlined above (i.e. making backtrace data available from Caml).
> However, you'd get a backtrace in terms of file names and line
> numbers, which don't make that much sense for toplevel definitions.

yes they do. file=function name.

> Functions names don't really exist in compiled code.

sure - but file/line annotations do, and they can be easily augmented
with function names.

Sam Steingold ( on Fedora Core release 6 (Zod)
Stupidity, like virtue, is its own reward.