|Anonymous | Login | Signup for a new account||2017-10-22 17:32 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005583||OCaml||runtime system and C interface||public||2012-04-11 15:18||2016-12-08 10:10|
|Priority||normal||Severity||feature||Reproducibility||have not tried|
|Target Version||Fixed in Version||4.04.0|
|Summary||0005583: debug info for OCaml runtime|
|Description||Please compile the C code comprising OCaml runtime with debug information, so that looking into internal structures with gdb at run time is easier.|
E.g. currently :
(gdb) p &caml_ref_table
$1 = (<data variable, no debug info> *) 0xbed2c0
Also when compiling C bindings ocamlc should do the same.
Currently -g is enabled for the debug runtime, but it has runtime cost due to -DDEBUG.
|Tags||No tags attached.|
What is the cost of doing this? Does -g preclude some optimizations? How much bigger is the executable? How many people want to look at the runtime with gdb? Don't they already know how to recompile with symbols?
-g normally shouldn't change the generated code (but see http://stackoverflow.com/a/89619/118799 [^]), it only adds debugging sections, so the executable naturally becomes bigger. Those sections are not loaded at runtime, so the RAM usage is not affected. Debugger maps those sections to memory when needed. Moreover, debug info can be stripped from the binaries and distributed separately (that's a common practice in various distros, witness -dbg packages in debian).
Size change after ./configure -cc 'gcc -g' :
lib/ocaml/*.a : 3.7M -> 5.9M
libasmrun.a : 296K -> 824K
libcamlrun.a : 344K -> 968K
Probably those who need it can recompile manually. My reason was that it doesn't hurt and can be useful sometimes.
|In 4.04 the runtime is compiled with -g.|
|2012-04-11 15:18||ygrek||New Issue|
|2012-05-02 16:53||doligez||Note Added: 0007400|
|2012-05-02 16:53||doligez||Assigned To||=> doligez|
|2012-05-02 16:53||doligez||Status||new => feedback|
|2012-05-07 12:05||ygrek||Note Added: 0007419|
|2012-05-07 12:05||ygrek||Status||feedback => assigned|
|2016-12-08 10:10||shinwell||Note Added: 0016825|
|2016-12-08 10:10||shinwell||Status||assigned => resolved|
|2016-12-08 10:10||shinwell||Fixed in Version||=> 4.04.0|
|2016-12-08 10:10||shinwell||Resolution||open => fixed|
|2017-02-23 16:43||doligez||Category||OCaml runtime system => runtime system|
|2017-03-03 17:45||doligez||Category||runtime system => runtime system and C interface|
|Copyright © 2000 - 2011 MantisBT Group|