From 361253d66fde0eb79d3fde7cc272e43689768ee7 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 20 Mar 2017 13:12:16 +0100 Subject: Better fix for problems with quoting in files. Instead of using Filename.quote, string entries are printed with %S. Bug 21216 --- debug/DwarfPrinter.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debug/DwarfPrinter.ml') diff --git a/debug/DwarfPrinter.ml b/debug/DwarfPrinter.ml index 13e7765d..bfd43b0b 100644 --- a/debug/DwarfPrinter.ml +++ b/debug/DwarfPrinter.ml @@ -307,7 +307,7 @@ module DwarfPrinter(Target: DWARF_TARGET): let print_string oc c = function | Simple_string s -> - fprintf oc " .asciz \"%s\"%a\n" s print_comment c + fprintf oc " .asciz %S%a\n" s print_comment c | Offset_string (o,s) -> let c = sprintf "%s %s" c s in print_loc_ref oc c o @@ -661,7 +661,7 @@ module DwarfPrinter(Target: DWARF_TARGET): let s = List.sort (fun (a,_) (b,_) -> Pervasives.compare a b) s in List.iter (fun (id,s) -> print_label oc (loc_to_label id); - fprintf oc " .asciz \"%s\"\n" s) s) + fprintf oc " .asciz %S\n" s) s) (* Print the debug info and abbrev section *) -- cgit