diff options
Diffstat (limited to 'powerpc')
-rw-r--r-- | powerpc/TargetPrinter.ml | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/powerpc/TargetPrinter.ml b/powerpc/TargetPrinter.ml index eca7a1b8..58117ee7 100644 --- a/powerpc/TargetPrinter.ml +++ b/powerpc/TargetPrinter.ml @@ -246,8 +246,9 @@ module Diab_System : SYSTEM = let filenum : (string,int) Hashtbl.t = Hashtbl.create 7 - let additional_debug_sections: StringSet.t ref = ref StringSet.empty + module StringSet = Set.Make(String) + let additional_debug_sections: StringSet.t ref = ref StringSet.empty let print_epilogue oc = if !Clflags.option_g then @@ -257,10 +258,10 @@ module Diab_System : SYSTEM = end_addr := label_end; fprintf oc "%a:\n" label label_end; fprintf oc " .text\n"; - StringSet.iter (fun file -> + Debug.all_files_iter (fun file -> let label = new_label () in Hashtbl.add filenum file label; - fprintf oc ".L%d: .d2filenum \"%s\"\n" label file) !all_files; + fprintf oc ".L%d: .d2filenum \"%s\"\n" label file); fprintf oc " .d2_line_end\n"; StringSet.iter (fun s -> fprintf oc " %s\n" s; @@ -862,7 +863,16 @@ module Target (System : SYSTEM):TARGET = let section oc sec = section oc sec; debug_section oc sec + + let locations = (Hashtbl.create 17 : (atom,DwarfTypes.location_value) Hashtbl.t) + + let get_location a = try Some (Hashtbl.find locations a) with Not_found -> None + let get_segment_location _ = None + + let add_var_location a = + if !Clflags.option_g && Configuration.advanced_debug then + Hashtbl.add locations a (DwarfTypes.LocSymbol a); end let sel_target () = |