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

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



On Mon, Apr 09, 2007 at 03:03:47PM +0200, Stefano Zacchiroli wrote:
> On Mon, Apr 09, 2007 at 02:59:39PM +0200, Sven Luther wrote:
> > One interesting question here, is what is the cost of adding those debugging
> > symbols ? 
> 
> Quoting from the OCaml manual (3.09) [1]:
> 
> > Before the debugger can be used, the program must be compiled and
> > linked with the -g option: all .cmo and .cma files that are part of
> > the program should have been created with ocamlc -g, and they must be
> > linked together with ocamlc -g.
> >
> > Compiling with -g entails no penalty on the running time of programs:
> > object files and bytecode executable files are bigger and take longer
> > to produce, but the executable files run at exactly the same speed as
> > if they had been compiled without -g.
> 
> So: no runtime penalty, only size increase. (Of course I'm speaking
> module the increased time the interpreter will need to load a bigger
> caml object, but that should be negligible most of the time).

So, this means there is no runtime cost, and only a size increase.

And i suppose that if you link the binary without -g, then the debugging
symbols are not included in the final binary, which would be the behaviour
Julien mentioned.

This would strongly hint at a behaviour of always including the debug symbols
in libraries, and since the .cmo/.cma are in the -dev file anyway, this would
not impose a size penalty on the normal user at all.

Do we have an idea of how much the size increase is ? 

Friendly,

Sven Luther



Reply to: