[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#415194: libextlib-ocaml-dev: No debugging information



On Mon, 9 Apr 2007, Stefano Zacchiroli wrote:
On Mon, Apr 09, 2007 at 09:25:34PM +1000, skaller wrote:
Is it still possible to use the debugger and get a backtrace etc
if there are no debugging symbols in these libraries?

Of course not, but this is not the point. Indeed, the same argument can
be made for C libraries, but for C libraries the default is not to ship
debugging symbols, why OCaml should make a difference from this point of
view? That's the question we should find an answer for (or alternatively
remove the debugging symbols from all OCaml libraries...).

You can still get a partial backtrace, like in C, but it's a bit less useful than in C. One reason is tha lack of disasm. A bigger problem is polymorphism. Without debugging symbols in *every* function in the backtrace, it's not generally possible to infer the type of a polymorphic variable, so ocamldebug can't print it.

So the big difference in my mind is that for C you usually don't need debugging symbols for the libraries unless you are debugging the libraries themselves. In Ocaml you need debugging symbols for the library if you are debugging any function that is being called by the library, and, due to the increased use of higher order functions, that happens a lot.

Ivan



Reply to: