dwarf-synthesis/DwarfSynth/Main.ml
Théophile Bastian 3d336de196 Add flag to never go back to undefined rbp
Once rbp has been set in the DWARF, if this flag is set, nothing will
remove it from the table. This mimicks gcc and allows us to check easily
our tables against theirs.
2019-04-04 11:52:47 +02:00

11 lines
393 B
OCaml

open Std
let main ?no_rbp_undef:(no_rbp_undef=false) outfile proj =
let pre_dwarf = proj
|> Simplest.of_proj no_rbp_undef
|> Simplest.clean_lost_track_subs in
Format.printf "%a" Frontend.pp_pre_dwarf_readelf pre_dwarf;
let pre_c_dwarf = PreCBinding.convert_pre_c pre_dwarf in
let fd = open_out_bin outfile in
Marshal.to_channel fd pre_c_dwarf []