jon.recoil.org

Module Dwarf

Generation and emission of DWARF debugging information for OCaml compilation units.

type t
val create : sourcefile:string -> unit_name:Ident.t -> asm_directives:Asm_targets.Asm_directives_dwarf.t -> get_file_id:(string -> int) -> code_begin:Asm_targets.Asm_symbol.t -> code_end:Asm_targets.Asm_symbol.t -> Dwarf.t

Create a value of type t, which holds all state necessary to emit DWARF debugging information for a single compilation unit. The names of certain parameters line up with the code in Asmgen. The current Compilation_unit must have been set before calling this function.

type fundecl = private {
  1. fun_end_label : Cmm.label;
  2. fundecl : Linear.fundecl;
}
val dwarf_for_fundecl : Dwarf.t -> Linear.fundecl -> fun_end_label:Cmm.label -> ppf_dump:Stdlib.Format.formatter -> Dwarf.fundecl
val emit : Dwarf.t -> basic_block_sections:bool -> binary_backend_available:bool -> unit

Write the DWARF information to the assembly file. This should only be called once all (in)constants and function declarations have been passed to the above functions.

val emit_delayed : Dwarf.t -> basic_block_sections:bool -> binary_backend_available:bool -> unit