Index: src/runops_cores.c =================================================================== --- src/runops_cores.c (revision 36403) +++ src/runops_cores.c (working copy) @@ -62,6 +62,10 @@ runops_fast_core(PARROT_INTERP, ARGIN(opcode_t *pc)) { ASSERT_ARGS(runops_fast_core) + + /* not keeping pc correct, see t/op/debuginfo.t */ + CONTEXT(interp)->current_pc = NULL; + while (pc) { DO_OP(pc, interp); } @@ -90,6 +94,10 @@ runops_cgoto_core(PARROT_INTERP, ARGIN(opcode_t *pc)) { ASSERT_ARGS(runops_cgoto_core) + + /* not keeping pc correct, see t/op/debuginfo.t */ + CONTEXT(interp)->current_pc = NULL; + #ifdef HAVE_COMPUTED_GOTO pc = cg_core(pc, interp); return pc; Index: t/op/debuginfo.t =================================================================== --- t/op/debuginfo.t (revision 36403) +++ t/op/debuginfo.t (working copy) @@ -23,7 +23,11 @@ =cut -pasm_output_like( <<'CODE', <<'OUTPUT', "getline, getfile" ); +$ENV{TEST_PROG_ARGS} ||= ''; +my $nolineno = $ENV{TEST_PROG_ARGS} =~ /-f|-g/ + ? "\\(unknown file\\)\n-1" : "debuginfo_\\d+\\.pasm\n\\d"; + +pasm_output_like( <<'CODE', <<"OUTPUT", "getline, getfile" ); .pcc_sub main: getfile S0 getline I0 @@ -33,8 +37,7 @@ print "\n" end CODE -/debuginfo_\d+\.pasm -\d/ +/$nolineno/ OUTPUT pir_error_output_like( <<'CODE', <<'OUTPUT', "debug backtrace - Null PMC access" ); @@ -159,8 +162,11 @@ called from Sub 'main' pc (\d+|-1) \(.*?:(\d+|-1)\)$/ OUTPUT +$nolineno = $ENV{TEST_PROG_ARGS} =~ /-f|-g/ + ? '\(\(unknown file\):-1\)' : '\(xyz.pir:126\)'; + # See "RT #43269 and .annotate -pir_error_output_like( <<'CODE', <<'OUTPUT', "setfile and setline" ); +pir_error_output_like( <<'CODE', <<"OUTPUT", "setfile and setline" ); .sub main :main setfile "xyz.pir" setline 123 @@ -169,11 +175,13 @@ 'no_such_function'($S0, $I0) .end CODE -/\(xyz.pir:126\)/ +/$nolineno/ OUTPUT +$nolineno = $ENV{TEST_PROG_ARGS} =~ /-f|-g/ + ? '\(\(unknown file\):-1\)' : '\(foo.p6:128\)'; # See "RT #43269 and .annotate -pir_error_output_like( <<'CODE', <<'OUTPUT', "setfile and setline" ); +pir_error_output_like( <<'CODE', <<"OUTPUT", "setfile and setline" ); .sub main :main setfile "foo.p6" setline 123 @@ -188,7 +196,7 @@ 'nsf'($P1) .end CODE -/\(foo.p6:128\)/ +/$nolineno/ OUTPUT # Local Variables: