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
Debugging C and OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-03-02 (07:36)
From: Mark Shinwell <mshinwell@j...>
Subject: Re: [Caml-list] Debugging C and OCaml
On Mon, Mar 01, 2010 at 07:52:01PM -0500, Jianzhou Zhao wrote:
> > It seems that OCaml runtime is interpreting via 'caml_interprete' the
> > OCaml function which C
> > calls at runtime. If this is true, we cannot really debug that OCaml
> > function, but we can
> > see how it is interpreted. But I guess we can debug the real assembly if I do
> > native compilation.
> If we do native compilation, will each OCaml function be assembled to
> a function in assemly with a readable name? That will help a lot while
> reading the assemly code.

The names are mangled, but it's pretty easy to work out what they correspond
to, except in the case of anonymous functions where you may need to do some
detective work.