From aff813685455559f6d6a88158dd3d605893ba3a3 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 25 Sep 2015 16:43:18 +0200 Subject: Added support for the locations of stack allocated local variables. This commit adds furher support for location information for local variables and starts with the implementation of the debug_loc section. --- backend/PrintAsm.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'backend/PrintAsm.ml') diff --git a/backend/PrintAsm.ml b/backend/PrintAsm.ml index 9ffe3aa5..104440c6 100644 --- a/backend/PrintAsm.ml +++ b/backend/PrintAsm.ml @@ -66,7 +66,9 @@ module Printer(Target:TARGET) = print_debug_label oc e; Target.print_fun_info oc name; Target.emit_constants oc lit; - Target.print_jumptable oc jmptbl + Target.print_jumptable oc jmptbl; + if !Clflags.option_g then + Hashtbl.iter (fun p i -> Debug.add_label name p i) current_function_labels let print_init_data oc name id = if Str.string_match PrintCsyntax.re_string_literal (extern_atom name) 0 @@ -141,6 +143,6 @@ let print_program oc p db = begin match Debug.generate_debug_info () with | None -> () - | Some db -> - Printer.DebugPrinter.print_debug oc db + | Some (db,loc) -> + Printer.DebugPrinter.print_debug oc db loc end -- cgit