aboutsummaryrefslogtreecommitdiffstats
path: root/backend/PrintAsm.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-17 18:19:37 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-17 18:19:37 +0200
commitc8a0b76c6b9c3eb004a7fccdd2ad15cc8615ef93 (patch)
treec9dacff414156d4d527ac40078cbdc51f160c8d0 /backend/PrintAsm.ml
parent98cddc7ba45b34fbd71d9a80c27a8e5ec6b311b0 (diff)
downloadcompcert-kvx-c8a0b76c6b9c3eb004a7fccdd2ad15cc8615ef93.tar.gz
compcert-kvx-c8a0b76c6b9c3eb004a7fccdd2ad15cc8615ef93.zip
First version with computation of dwarf info from debug info.
Introduced a new dwarf generation from the information collected in the DebugInformation and removed the old CtODwarf translation.
Diffstat (limited to 'backend/PrintAsm.ml')
-rw-r--r--backend/PrintAsm.ml9
1 files changed, 4 insertions, 5 deletions
diff --git a/backend/PrintAsm.ml b/backend/PrintAsm.ml
index ea3d985a..9ffe3aa5 100644
--- a/backend/PrintAsm.ml
+++ b/backend/PrintAsm.ml
@@ -27,9 +27,9 @@ module Printer(Target:TARGET) =
let addr_mapping: (string, (int * int)) Hashtbl.t = Hashtbl.create 7
let get_fun_addr name =
- let s = new_label ()
- and e = new_label () in
- Debug.add_fun_addr name (s,e);
+ let s = Target.new_label ()
+ and e = Target.new_label () in
+ Debug.add_fun_addr name (e,s);
s,e
let print_debug_label oc l =
@@ -118,7 +118,6 @@ module Printer(Target:TARGET) =
let get_end_addr = Target.get_end_addr
let get_stmt_list_addr = Target.get_stmt_list_addr
let name_of_section = Target.name_of_section
- let get_fun_addr s = try Some (Hashtbl.find addr_mapping s) with Not_found -> None
let get_location a = None
let get_frame_base a = None
let symbol = Target.symbol
@@ -140,7 +139,7 @@ let print_program oc p db =
close_filenames ();
if !Clflags.option_g && Configuration.advanced_debug then
begin
- match db with
+ match Debug.generate_debug_info () with
| None -> ()
| Some db ->
Printer.DebugPrinter.print_debug oc db