jon.recoil.org

Module Dwarf_flags

type debug_thing =
  1. | Debug_ocamldebug
  2. | Debug_js_of_ocaml
  3. | Debug_subprocs
  4. | Debug_backtraces
  5. | Debug_bounds_checking
  6. | Debug_disable_bytecode_opt
  7. | Debug_dwarf_cfi
  8. | Debug_dwarf_loc
  9. | Debug_dwarf_functions
  10. | Debug_dwarf_scopes
  11. | Debug_dwarf_vars
  12. | Debug_dwarf_call_sites
  13. | Debug_dwarf_cmm
val debug_thing : Dwarf_flags.debug_thing -> bool
val set_debug_thing : Dwarf_flags.debug_thing -> unit
val clear_debug_thing : Dwarf_flags.debug_thing -> unit
val describe_debug_default : Dwarf_flags.debug_thing -> string
val describe_debug_default_negated : Dwarf_flags.debug_thing -> string
val use_g : unit -> unit
val use_g0 : unit -> unit
val use_g1 : unit -> unit
val use_g2 : unit -> unit
val use_g3 : unit -> unit
val restrict_to_upstream_dwarf : bool Stdlib.ref
val dwarf_max_function_complexity : int Stdlib.ref
val dwarf_for_startup_file : bool Stdlib.ref
type dwarf_version =
  1. | Four
  2. | Five
val default_gdwarf_version : Dwarf_flags.dwarf_version
val gdwarf_offsets : bool Stdlib.ref
val default_gdwarf_offsets : bool
val gdwarf_self_tail_calls : bool Stdlib.ref
val default_gdwarf_self_tail_calls : bool
type dwarf_format =
  1. | Thirty_two
  2. | Sixty_four
val default_gdwarf_format : Dwarf_flags.dwarf_format
val default_ddebug_invariants : bool
val ddebug_invariants : bool Stdlib.ref
val default_ddebug_available_regs : bool
val ddebug_available_regs : bool Stdlib.ref
val default_ddwarf_types : bool
val ddwarf_types : bool Stdlib.ref
val gdwarf_may_alter_codegen : bool Stdlib.ref
val gdwarf_may_alter_codegen_experimental : bool Stdlib.ref
val dwarf_inlined_frames : bool Stdlib.ref

Setting this to true will emit sufficient DWARF to get inlined frame information, but won't emit information e.g. about local variables (unless restrict_to_upstream_dwarf is set to false, although that implies this variable being set to true).

val default_gdwarf_compression : string
val gdwarf_compression : string Stdlib.ref
val ddwarf_metrics : bool Stdlib.ref
val ddwarf_metrics_output_file : string option Stdlib.ref
val get_dwarf_c_toolchain_flag : unit -> string

Get the DWARF compression flag to pass to the C toolchain. Returns a flag of the form " -gz=<compression>" (note the leading space). Returns an empty string if compression is not enabled. Note: The -gz= option is common between GCC and Clang, unlike --compress-debug-sections. See: https://maskray.me/blog/2022-01-23-compressed-debug-sections

val get_dwarf_as_toolchain_flag : unit -> string

Get the DWARF compression flag to pass to the assembler. Similar to get_dwarf_c_toolchain_flag but uses the assembler-specific flag. Returns a string with a leading space if not empty.

val get_dwarf_compression_format : unit -> string option

Get the DWARF compression format to use. Returns Some compression if compression is enabled and not "none" or empty. Returns None otherwise.

val get_dwarf_objcopy_compression_format : unit -> string option

Get the DWARF compression format to use with objcopy. Returns Some compression only if compression is enabled and objcopy supports it. Returns None otherwise.