From 60ab550a952c3d9719b2a91ec90c9b58769f6717 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 14 Oct 2015 15:07:48 +0200 Subject: bug 17392: remove trailing whitespace in source files --- backend/PrintAsm.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'backend/PrintAsm.ml') diff --git a/backend/PrintAsm.ml b/backend/PrintAsm.ml index 594b43b7..e7c945e3 100644 --- a/backend/PrintAsm.ml +++ b/backend/PrintAsm.ml @@ -38,7 +38,7 @@ module Printer(Target:TARGET) = let print_location oc loc = if loc <> Cutil.no_loc then Target.print_file_line oc (fst loc) (snd loc) - + let print_function oc name fn = Hashtbl.clear current_function_labels; Target.reset_constants (); @@ -66,7 +66,7 @@ module Printer(Target:TARGET) = 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 && List.for_all (function Init_int8 _ -> true | _ -> false) id @@ -74,7 +74,7 @@ module Printer(Target:TARGET) = fprintf oc " .ascii \"%s\"\n" (PrintCsyntax.string_of_init id) else List.iter (Target.print_init oc) id - + let print_var oc name v = match v.gvar_init with | [] -> () @@ -101,7 +101,7 @@ module Printer(Target:TARGET) = let sz = match v.gvar_init with [Init_space sz] -> sz | _ -> assert false in Target.print_comm_symb oc sz name align - + let print_globdef oc (name,gdef) = match gdef with | Gfun (Internal code) -> print_function oc name code @@ -116,7 +116,7 @@ module Printer(Target:TARGET) = let symbol = Target.symbol end - module DebugPrinter = DwarfPrinter (DwarfTarget) + module DebugPrinter = DwarfPrinter (DwarfTarget) end let print_program oc p db = -- cgit From df78560fdf859644274dbdabccdd1fdb9e75634e Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 14 Oct 2015 18:06:04 +0200 Subject: More verbose debug printer. Like, for example the clang, CompCert now prints a more detailed descriptions of the debug information in the assembler file. For each abbreviation and debug entry the dwarf attributes and their encodings are added. Bug 17392. --- backend/PrintAsm.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/PrintAsm.ml') diff --git a/backend/PrintAsm.ml b/backend/PrintAsm.ml index e7c945e3..0120f4bc 100644 --- a/backend/PrintAsm.ml +++ b/backend/PrintAsm.ml @@ -112,8 +112,8 @@ module Printer(Target:TARGET) = struct let label = Target.label let section = Target.section - let name_of_section = Target.name_of_section let symbol = Target.symbol + let comment = Target.comment end module DebugPrinter = DwarfPrinter (DwarfTarget) -- cgit From 1e52bb2001964d87086cea00d0cb779e270b99ce Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 15 Oct 2015 13:15:28 +0200 Subject: First step to implemente address ranges for the gnu backend. In contrast to the dcc, the gcc uses address ranges to express non-contiguous range of addresses. As a first step we set the start and end addresses for the different address ranges for the compilation unit by using the start and end addresses of functions. Bug 17392. --- backend/PrintAsm.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backend/PrintAsm.ml') diff --git a/backend/PrintAsm.ml b/backend/PrintAsm.ml index 0120f4bc..6c1eda57 100644 --- a/backend/PrintAsm.ml +++ b/backend/PrintAsm.ml @@ -24,10 +24,10 @@ open TargetPrinter module Printer(Target:TARGET) = struct - let get_fun_addr name = + let get_fun_addr name txt = let s = Target.new_label () and e = Target.new_label () in - Debug.add_fun_addr name (e,s); + Debug.add_fun_addr name txt (e,s); s,e let print_debug_label oc l = @@ -51,7 +51,7 @@ module Printer(Target:TARGET) = fprintf oc " .globl %a\n" Target.symbol name; Target.print_optional_fun_info oc; let s,e = if !Clflags.option_g && Configuration.advanced_debug then - get_fun_addr name + get_fun_addr name text else -1,-1 in print_debug_label oc s; -- cgit