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. --- debug/DebugInformation.ml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'debug/DebugInformation.ml') diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml index 95f34b1d..51fbfde9 100644 --- a/debug/DebugInformation.ml +++ b/debug/DebugInformation.ml @@ -593,10 +593,20 @@ let add_compilation_section_end sec addr = let sec = section_to_string sec in Hashtbl.add compilation_section_end sec addr -let add_diab_info sec addr1 add2 = +let add_diab_info sec addr1 add2 addr3 = let sec' = section_to_string sec in + Hashtbl.add compilation_section_start sec' addr3; Hashtbl.add diab_additional sec' (addr1,add2,sec) +let diab_add_fun_addr name _ addr = add_fun_addr name addr + +let gnu_add_fun_addr name sec (high,low) = + let sec = section_to_string sec in + if not (Hashtbl.mem compilation_section_start sec) then + Hashtbl.add compilation_section_start sec low; + Hashtbl.replace compilation_section_end sec high; + add_fun_addr name (high,low) + let exists_section sec = Hashtbl.mem compilation_section_start (section_to_string sec) -- cgit