aboutsummaryrefslogtreecommitdiffstats
path: root/debug/DebugInit.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-10-15 13:15:28 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-10-15 13:15:28 +0200
commit1e52bb2001964d87086cea00d0cb779e270b99ce (patch)
tree1a4c629ee6b8c5130654be3a42fb91f38fc80984 /debug/DebugInit.ml
parent44845982f412810b0c18067987f2780ef6245fbb (diff)
downloadcompcert-kvx-1e52bb2001964d87086cea00d0cb779e270b99ce.tar.gz
compcert-kvx-1e52bb2001964d87086cea00d0cb779e270b99ce.zip
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.
Diffstat (limited to 'debug/DebugInit.ml')
-rw-r--r--debug/DebugInit.ml17
1 files changed, 9 insertions, 8 deletions
diff --git a/debug/DebugInit.ml b/debug/DebugInit.ml
index 209f2024..b4240af7 100644
--- a/debug/DebugInit.ml
+++ b/debug/DebugInit.ml
@@ -26,7 +26,7 @@ let default_debug =
set_member_offset = DebugInformation.set_member_offset;
set_bitfield_offset = DebugInformation.set_bitfield_offset;
insert_global_declaration = DebugInformation.insert_global_declaration;
- add_fun_addr = DebugInformation.add_fun_addr;
+ add_fun_addr = (fun _ _ _ -> ());
generate_debug_info = (fun _ _ -> None);
all_files_iter = (fun f -> DebugInformation.StringSet.iter f !DebugInformation.all_files);
insert_local_declaration = DebugInformation.insert_local_declaration;
@@ -41,23 +41,24 @@ let default_debug =
stack_variable = DebugInformation.stack_variable;
add_label = DebugInformation.add_label;
atom_parameter = DebugInformation.atom_parameter;
- add_compilation_section_start = DebugInformation.add_compilation_section_start;
- add_compilation_section_end = DebugInformation.add_compilation_section_end;
compute_diab_file_enum = DebugInformation.compute_diab_file_enum;
compute_gnu_file_enum = DebugInformation.compute_gnu_file_enum;
exists_section = DebugInformation.exists_section;
remove_unused = DebugInformation.remove_unused;
variable_printed = DebugInformation.variable_printed;
- add_diab_info = DebugInformation.add_diab_info;
+ add_diab_info = (fun _ _ _ _ -> ());
}
let init_debug () =
- let gen =
+ implem :=
if Configuration.system = "diab" then
- (fun a b -> Some (Dwarfgen.gen_diab_debug_info a b))
+ let gen = (fun a b -> Some (Dwarfgen.gen_diab_debug_info a b)) in
+ {default_debug with generate_debug_info = gen;
+ add_diab_info = DebugInformation.add_diab_info;
+ add_fun_addr = DebugInformation.diab_add_fun_addr;}
else
- (fun a b -> Some (Dwarfgen.gen_gnu_debug_info a b)) in
- implem := {default_debug with generate_debug_info = gen;}
+ {default_debug with generate_debug_info = (fun a b -> Some (Dwarfgen.gen_gnu_debug_info a b));
+ add_fun_addr = DebugInformation.gnu_add_fun_addr}
let init_none () =
implem := default_implem