You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5583 Reporter:@ygrek Assigned to:@damiendoligez Status: resolved (set by @mshinwell on 2016-12-08T09:10:57Z) Resolution: fixed Priority: normal Severity: feature Fixed in version: 4.04.0 Category: runtime system and C interface
Bug 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.
The text was updated successfully, but these errors were encountered:
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).
Original bug ID: 5583
Reporter: @ygrek
Assigned to: @damiendoligez
Status: resolved (set by @mshinwell on 2016-12-08T09:10:57Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 4.04.0
Category: runtime system and C interface
Bug 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.
The text was updated successfully, but these errors were encountered: