From 8d2e4a51d56b7f4d3673a5132edd1adb37a14295 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 21 Aug 2015 15:21:36 +0200 Subject: Added symbol functions for printing of the location for global variables. --- arm/TargetPrinter.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arm') diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml index f8d72836..33071a9a 100644 --- a/arm/TargetPrinter.ml +++ b/arm/TargetPrinter.ml @@ -923,6 +923,12 @@ module Target (Opt: PRINTER_OPTIONS) : TARGET = let new_label = new_label let print_file_loc _ _ = () (* Dummy function *) + + let get_location _ = None (* Dummy function *) + + let get_segment_location _ = None (* Dummy function *) + + let add_var_location _ = () (* Dummy function *) end let sel_target () = -- cgit From 861292a6c5e58b4f78bef207c717b801b3fc1fed Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Sun, 6 Sep 2015 20:32:55 +0200 Subject: Startet implementation of new Debug interface. Added a new file debug/Debug.ml which will be the interface between for generating and printing the debuging information. Currently it contains only the code for the line directived. --- arm/TargetPrinter.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'arm') diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml index 028ff6ed..d0e07958 100644 --- a/arm/TargetPrinter.ml +++ b/arm/TargetPrinter.ml @@ -20,6 +20,7 @@ open AST open Memdata open Asm open PrintAsmaux +open Debug (* Type for the ABI versions *) type float_abi_type = -- cgit From cc6ce2bf9b8be54375ea3285ea2fa658bc108df0 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 10 Sep 2015 13:42:43 +0200 Subject: Revert "Startet implementation of new Debug interface." This reverts commit 861292a6c5e58b4f78bef207c717b801b3fc1fed. --- arm/TargetPrinter.ml | 1 - 1 file changed, 1 deletion(-) (limited to 'arm') diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml index d0e07958..028ff6ed 100644 --- a/arm/TargetPrinter.ml +++ b/arm/TargetPrinter.ml @@ -20,7 +20,6 @@ open AST open Memdata open Asm open PrintAsmaux -open Debug (* Type for the ABI versions *) type float_abi_type = -- cgit From d7f75509c290d871cb8cd8aa11a0be2923c9ef17 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 22 Sep 2015 19:44:47 +0200 Subject: Record the scope structure during unblocking. Instead of creating separate annotations for the local variables we call the Debug.add_lvar_scope and we construct a mapping from function id + scope id to scope information. --- arm/TargetPrinter.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arm') diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml index 028ff6ed..5f16fc9e 100644 --- a/arm/TargetPrinter.ml +++ b/arm/TargetPrinter.ml @@ -905,6 +905,8 @@ module Target (Opt: PRINTER_OPTIONS) : TARGET = let get_end_addr () = -1 (* Dummy constant *) let get_stmt_list_addr () = -1 (* Dummy constant *) + + let get_debug_start_addr () = -1 (* Dummy constant *) module DwarfAbbrevs = DwarfUtil.DefaultAbbrevs (* Dummy Abbrev types *) -- cgit 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. --- arm/TargetPrinter.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'arm') diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml index 5f16fc9e..30166215 100644 --- a/arm/TargetPrinter.ml +++ b/arm/TargetPrinter.ml @@ -153,6 +153,7 @@ module Target (Opt: PRINTER_OPTIONS) : TARGET = sprintf ".section \"%s\",\"a%s%s\",%%progbits" s (if wr then "w" else "") (if ex then "x" else "") | Section_debug_info + | Section_debug_loc | Section_debug_abbrev -> "" (* Dummy value *) let section oc sec = -- cgit From 91ed1b752d2661478840e40a0d977b068d99490d Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Sun, 27 Sep 2015 20:13:19 +0200 Subject: Added printing the reference address for the LocRef and started refactoring old Debuging code. The old functions to store the symbol for the Global variables and retrive this is no longer needed since the atom is stored in DebugInformation. Also the Debug.Abbrev module is no longer needed. --- arm/TargetPrinter.ml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'arm') diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml index 30166215..a7188206 100644 --- a/arm/TargetPrinter.ml +++ b/arm/TargetPrinter.ml @@ -908,20 +908,12 @@ module Target (Opt: PRINTER_OPTIONS) : TARGET = let get_stmt_list_addr () = -1 (* Dummy constant *) let get_debug_start_addr () = -1 (* Dummy constant *) - - module DwarfAbbrevs = DwarfUtil.DefaultAbbrevs (* Dummy Abbrev types *) - + let label = elf_label let new_label = new_label let print_file_loc _ _ = () (* Dummy function *) - - let get_location _ = None (* Dummy function *) - - let get_segment_location _ = None (* Dummy function *) - - let add_var_location _ = () (* Dummy function *) end let sel_target () = -- cgit From 68ad5472a78d12e0e4fd4eae422122185403d678 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 28 Sep 2015 18:39:43 +0200 Subject: Change the way the debug sections are printed. If a user uses the #pragma use_section for functions the diab linker requires a separate debug_info section for each entry. This commit adds functionality to emulate this behavior. --- arm/TargetPrinter.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arm') diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml index a7188206..86f9f973 100644 --- a/arm/TargetPrinter.ml +++ b/arm/TargetPrinter.ml @@ -152,7 +152,7 @@ module Target (Opt: PRINTER_OPTIONS) : TARGET = | Section_user(s, wr, ex) -> sprintf ".section \"%s\",\"a%s%s\",%%progbits" s (if wr then "w" else "") (if ex then "x" else "") - | Section_debug_info + | Section_debug_info _ | Section_debug_loc | Section_debug_abbrev -> "" (* Dummy value *) -- cgit