From 55eb2d92376f592258855cfa5c0cfbbf39e8e833 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 6 Oct 2015 11:08:58 +0200 Subject: Fast fix for functions in different sections in one compilation unit for gcc. --- debug/DwarfPrinter.ml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'debug/DwarfPrinter.ml') diff --git a/debug/DwarfPrinter.ml b/debug/DwarfPrinter.ml index 980c49db..2a54fa6a 100644 --- a/debug/DwarfPrinter.ml +++ b/debug/DwarfPrinter.ml @@ -590,8 +590,21 @@ module DwarfPrinter(Target: DWARF_TARGET): fprintf oc " .4byte 0\n"; fprintf oc " .4byte 0\n" + let print_location_entry_abs oc l = + print_label oc (loc_to_label l.loc_id); + List.iter (fun (b,e,loc) -> + fprintf oc " .4byte %a\n" label b; + fprintf oc " .4byte %a\n" label e; + print_list_loc oc loc) l.loc; + fprintf oc " .4byte 0\n"; + fprintf oc " .4byte 0\n" + + let print_location_list oc (c_low,l) = - List.iter (print_location_entry oc c_low) l + let f = match c_low with + | Some s -> print_location_entry oc s + | None -> print_location_entry_abs oc in + List.iter f l let print_diab_entries oc entries = let abbrev_start = new_label () in -- cgit