From a479c280441b91007c379b0b63b907926d54f930 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 13 Oct 2015 16:23:20 +0200 Subject: 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. --- debug/DwarfPrinter.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'debug') 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) -> -- cgit