Ticket #281: patch2.diff
| File patch2.diff, 2.3 KB (added by rg, 4 years ago) |
|---|
-
src/runops_cores.c
62 62 runops_fast_core(PARROT_INTERP, ARGIN(opcode_t *pc)) 63 63 { 64 64 ASSERT_ARGS(runops_fast_core) 65 66 /* not keeping pc correct, see t/op/debuginfo.t */ 67 CONTEXT(interp)->current_pc = NULL; 68 65 69 while (pc) { 66 70 DO_OP(pc, interp); 67 71 } … … 90 94 runops_cgoto_core(PARROT_INTERP, ARGIN(opcode_t *pc)) 91 95 { 92 96 ASSERT_ARGS(runops_cgoto_core) 97 98 /* not keeping pc correct, see t/op/debuginfo.t */ 99 CONTEXT(interp)->current_pc = NULL; 100 93 101 #ifdef HAVE_COMPUTED_GOTO 94 102 pc = cg_core(pc, interp); 95 103 return pc; -
t/op/debuginfo.t
23 23 24 24 =cut 25 25 26 pasm_output_like( <<'CODE', <<'OUTPUT', "getline, getfile" ); 26 $ENV{TEST_PROG_ARGS} ||= ''; 27 my $nolineno = $ENV{TEST_PROG_ARGS} =~ /-f|-g/ 28 ? "\\(unknown file\\)\n-1" : "debuginfo_\\d+\\.pasm\n\\d"; 29 30 pasm_output_like( <<'CODE', <<"OUTPUT", "getline, getfile" ); 27 31 .pcc_sub main: 28 32 getfile S0 29 33 getline I0 … … 33 37 print "\n" 34 38 end 35 39 CODE 36 /debuginfo_\d+\.pasm 37 \d/ 40 /$nolineno/ 38 41 OUTPUT 39 42 40 43 pir_error_output_like( <<'CODE', <<'OUTPUT', "debug backtrace - Null PMC access" ); … … 159 162 called from Sub 'main' pc (\d+|-1) \(.*?:(\d+|-1)\)$/ 160 163 OUTPUT 161 164 165 $nolineno = $ENV{TEST_PROG_ARGS} =~ /-f|-g/ 166 ? '\(\(unknown file\):-1\)' : '\(xyz.pir:126\)'; 167 162 168 # See "RT #43269 and .annotate 163 pir_error_output_like( <<'CODE', << 'OUTPUT', "setfile and setline" );169 pir_error_output_like( <<'CODE', <<"OUTPUT", "setfile and setline" ); 164 170 .sub main :main 165 171 setfile "xyz.pir" 166 172 setline 123 … … 169 175 'no_such_function'($S0, $I0) 170 176 .end 171 177 CODE 172 / \(xyz.pir:126\)/178 /$nolineno/ 173 179 OUTPUT 174 180 181 $nolineno = $ENV{TEST_PROG_ARGS} =~ /-f|-g/ 182 ? '\(\(unknown file\):-1\)' : '\(foo.p6:128\)'; 175 183 # See "RT #43269 and .annotate 176 pir_error_output_like( <<'CODE', << 'OUTPUT', "setfile and setline" );184 pir_error_output_like( <<'CODE', <<"OUTPUT", "setfile and setline" ); 177 185 .sub main :main 178 186 setfile "foo.p6" 179 187 setline 123 … … 188 196 'nsf'($P1) 189 197 .end 190 198 CODE 191 / \(foo.p6:128\)/199 /$nolineno/ 192 200 OUTPUT 193 201 194 202 # Local Variables:
