diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-09-25 16:43:18 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-09-25 16:43:18 +0200 |
commit | aff813685455559f6d6a88158dd3d605893ba3a3 (patch) | |
tree | 41905241a6f4d2969ad77e3952f4427d3cb4613d /backend | |
parent | fc8afb9287ab7b1607e5a7d2a03b0078fd9867d0 (diff) | |
download | compcert-aff813685455559f6d6a88158dd3d605893ba3a3.tar.gz compcert-aff813685455559f6d6a88158dd3d605893ba3a3.zip |
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.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/PrintAsm.ml | 8 |
1 files changed, 5 insertions, 3 deletions
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 |