aboutsummaryrefslogtreecommitdiffstats
path: root/debug/DebugInit.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-28 18:39:43 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-28 18:39:43 +0200
commit68ad5472a78d12e0e4fd4eae422122185403d678 (patch)
tree52674e67c21c4134118996f2b241f9496f7f5130 /debug/DebugInit.ml
parent5492b5b55afa68e3d628da07ff583a0cac79b7e3 (diff)
downloadcompcert-kvx-68ad5472a78d12e0e4fd4eae422122185403d678.tar.gz
compcert-kvx-68ad5472a78d12e0e4fd4eae422122185403d678.zip
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.
Diffstat (limited to 'debug/DebugInit.ml')
-rw-r--r--debug/DebugInit.ml14
1 files changed, 9 insertions, 5 deletions
diff --git a/debug/DebugInit.ml b/debug/DebugInit.ml
index 17db4354..e0c435cd 100644
--- a/debug/DebugInit.ml
+++ b/debug/DebugInit.ml
@@ -27,7 +27,7 @@ let init_debug () =
implem.set_bitfield_offset <- DebugInformation.set_bitfield_offset;
implem.insert_global_declaration <- DebugInformation.insert_global_declaration;
implem.add_fun_addr <- DebugInformation.add_fun_addr;
- implem.generate_debug_info <- (fun () -> Some (Dwarfgen.gen_debug_info ()));
+ implem.generate_debug_info <- (fun a b -> Some (Dwarfgen.gen_debug_info a b));
implem.all_files_iter <- (fun f -> DebugInformation.StringSet.iter f !DebugInformation.all_files);
implem.insert_local_declaration <- DebugInformation.insert_local_declaration;
implem.atom_local_variable <- DebugInformation.atom_local_variable;
@@ -41,7 +41,10 @@ let init_debug () =
implem.stack_variable <- DebugInformation.stack_variable;
implem.function_end <- DebugInformation.function_end;
implem.add_label <- DebugInformation.add_label;
- implem.atom_parameter <- DebugInformation.atom_parameter
+ implem.atom_parameter <- DebugInformation.atom_parameter;
+ implem.add_compilation_section_start <- DebugInformation.add_compilation_section_start;
+ implem.compute_file_enum <- DebugInformation.compute_file_enum;
+ implem.exists_section <- DebugInformation.exists_section
let init_none () =
implem.init <- (fun _ -> ());
@@ -52,7 +55,7 @@ let init_none () =
implem.set_bitfield_offset <- (fun _ _ _ _ _ -> ());
implem.insert_global_declaration <- (fun _ _ -> ());
implem.add_fun_addr <- (fun _ _ -> ());
- implem.generate_debug_info <- (fun _ -> None);
+ implem.generate_debug_info <- (fun _ _ -> None);
implem.all_files_iter <- (fun _ -> ());
implem.insert_local_declaration <- (fun _ _ _ _ -> ());
implem.atom_local_variable <- (fun _ _ -> ());
@@ -66,8 +69,9 @@ let init_none () =
implem.stack_variable <- (fun _ _ -> ());
implem.function_end <- (fun _ _ -> ());
implem.add_label <- (fun _ _ _ -> ());
- implem.atom_parameter <- (fun _ _ _ -> ())
-
+ implem.atom_parameter <- (fun _ _ _ -> ());
+ implem.add_compilation_section_start <- (fun _ _ -> ());
+ implem.exists_section <- (fun _ -> true)
let init () =
if !Clflags.option_g then