aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-10-13 16:23:20 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-10-13 16:23:20 +0200
commita479c280441b91007c379b0b63b907926d54f930 (patch)
tree830342b8c8ed25a9c16aacac0aedc8aa477c2431 /debug
parent16315711d815580afa77f93424cc49c7362ab5b8 (diff)
downloadcompcert-kvx-a479c280441b91007c379b0b63b907926d54f930.tar.gz
compcert-kvx-a479c280441b91007c379b0b63b907926d54f930.zip
Changed the type of the debug sections with additional string.
Instead of using a string they now take an optional string, which should be none if the backend is not the diab backend and the corresponding section is the text section and Some s with s being the custom section name else. Bug 17392.
Diffstat (limited to 'debug')
-rw-r--r--debug/DwarfPrinter.ml7
1 files changed, 4 insertions, 3 deletions
diff --git a/debug/DwarfPrinter.ml b/debug/DwarfPrinter.ml
index 407850a5..12ad16bf 100644
--- a/debug/DwarfPrinter.ml
+++ b/debug/DwarfPrinter.ml
@@ -602,7 +602,8 @@ module DwarfPrinter(Target: DWARF_TARGET):
List.iter (fun e -> compute_abbrev e.entry) entries;
print_abbrev oc;
List.iter (fun e ->
- section oc (Section_debug_info e.section_name);
+ let name = if e.section_name <> ".text" then Some e.section_name else None in
+ section oc (Section_debug_info name);
print_debug_info oc e.start_label e.line_label e.entry) entries;
section oc Section_debug_loc;
List.iter (fun e -> print_location_list oc e.locs) entries
@@ -613,12 +614,12 @@ module DwarfPrinter(Target: DWARF_TARGET):
and start = new_label ()
and abbrev_start = new_label () in
abbrev_start_addr := abbrev_start;
- section oc (Section_debug_info "");
+ section oc (Section_debug_info None);
print_debug_info oc start line_start cp;
print_abbrev oc;
section oc Section_debug_loc;
print_location_list oc loc;
- section oc (Section_debug_line "");
+ section oc (Section_debug_line None);
print_label oc line_start;
section oc Section_debug_str;
List.iter (fun (id,s) ->