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
[Caml-list] exception stack trace from --output-obj'ed Caml code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] exception stack trace from --output-obj'ed Caml code
> Hi, I have OCAMLRUNPARAM set to b=1 and have compiled and linked with the
> -g flag. I am doing linking with gcc because I have a C main and C
> objects. The Caml code is compiled with the -output-obj flag to create a
> .o that gcc links with. Unfortunately, I'm not seeing exception stack
> traces for uncaught exceptions. For example, I get:
> Fatal error: exception Invalid_argument("String.get")
> (Program not linked with -g, cannot print stack backtrace)

This is a known limitation of -output-obj: the debug info that is used
to generate stack backtraces is not included in the generated object file.

> Is there a way to solve this while continuing to use -output-obj to
> generate a C-like object for gcc to link against ?

No, not currently.

- Xavier Leroy

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: