|
| 1 | +diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp |
| 2 | +index 3c58633..f69d42e 100644 |
| 3 | +--- a/asmcomp/amd64/emit.mlp |
| 4 | ++++ b/asmcomp/amd64/emit.mlp |
| 5 | +@@ -922,7 +922,7 @@ let data l = |
| 6 | + |
| 7 | + let begin_assembly() = |
| 8 | + X86_proc.reset_asm_code (); |
| 9 | +- reset_debug_info(); (* PR#5603 *) |
| 10 | ++ reset_debug_info_at_file_num 2; (* A09. PR#5603 *) |
| 11 | + reset_imp_table(); |
| 12 | + float_constants := []; |
| 13 | + all_functions := []; |
| 14 | +diff --git a/asmcomp/emitaux.ml b/asmcomp/emitaux.ml |
| 15 | +index d3587c1..0dca6a9 100644 |
| 16 | +--- a/asmcomp/emitaux.ml |
| 17 | ++++ b/asmcomp/emitaux.ml |
| 18 | +@@ -341,6 +341,10 @@ let reset_debug_info () = |
| 19 | + file_pos_nums := []; |
| 20 | + file_pos_num_cnt := 1 |
| 21 | + |
| 22 | ++let reset_debug_info_at_file_num file_num = |
| 23 | ++ file_pos_nums := []; |
| 24 | ++ file_pos_num_cnt := file_num |
| 25 | ++ |
| 26 | + (* We only display .file if the file has not been seen before. We |
| 27 | + display .loc for every instruction. *) |
| 28 | + let emit_debug_info_gen dbg file_emitter loc_emitter = |
| 29 | +diff --git a/asmcomp/emitaux.mli b/asmcomp/emitaux.mli |
| 30 | +index df0b019..34d1ac1 100644 |
| 31 | +--- a/asmcomp/emitaux.mli |
| 32 | ++++ b/asmcomp/emitaux.mli |
| 33 | +@@ -32,6 +32,7 @@ val emit_float32_directive: string -> int32 -> unit |
| 34 | + |
| 35 | + val reset : unit -> unit |
| 36 | + val reset_debug_info: unit -> unit |
| 37 | ++val reset_debug_info_at_file_num: int -> unit |
| 38 | + val emit_debug_info: Debuginfo.t -> unit |
| 39 | + val emit_debug_info_gen : |
| 40 | + Debuginfo.t -> |
| 41 | +diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp |
| 42 | +index b76af36..69489a2 100644 |
| 43 | +--- a/asmcomp/i386/emit.mlp |
| 44 | ++++ b/asmcomp/i386/emit.mlp |
| 45 | +@@ -948,7 +948,7 @@ let data l = |
| 46 | + |
| 47 | + let begin_assembly() = |
| 48 | + X86_proc.reset_asm_code (); |
| 49 | +- reset_debug_info(); (* PR#5603 *) |
| 50 | ++ reset_debug_info_at_file_num 2; (* A09. PR#5603 *) |
| 51 | + float_constants := []; |
| 52 | + if system = S_win32 then begin |
| 53 | + D.mode386 (); |
| 54 | +diff --git a/asmcomp/x86_gas.ml b/asmcomp/x86_gas.ml |
| 55 | +index 6d2363a..9548e91 100644 |
| 56 | +--- a/asmcomp/x86_gas.ml |
| 57 | ++++ b/asmcomp/x86_gas.ml |
| 58 | +@@ -300,7 +300,7 @@ let print_line b = function |
| 59 | + |
| 60 | + let generate_asm oc lines = |
| 61 | + let b = Buffer.create 10000 in |
| 62 | +- output_string oc "\t.file \"\"\n"; (* PR#7037 *) |
| 63 | ++ output_string oc "\t.file 1 \"\"\n"; (* A09. PR#7037 *) |
| 64 | + List.iter |
| 65 | + (fun i -> |
| 66 | + Buffer.clear b; |
0 commit comments