Ticket #281: patch2.diff

File patch2.diff, 2.3 KB (added by rg, 6 years ago)

Different patch that disables file/line number information

  • src/runops_cores.c

     
    6262runops_fast_core(PARROT_INTERP, ARGIN(opcode_t *pc)) 
    6363{ 
    6464    ASSERT_ARGS(runops_fast_core) 
     65 
     66    /* not keeping pc correct, see t/op/debuginfo.t */ 
     67    CONTEXT(interp)->current_pc = NULL; 
     68 
    6569    while (pc) { 
    6670        DO_OP(pc, interp); 
    6771    } 
     
    9094runops_cgoto_core(PARROT_INTERP, ARGIN(opcode_t *pc)) 
    9195{ 
    9296    ASSERT_ARGS(runops_cgoto_core) 
     97 
     98    /* not keeping pc correct, see t/op/debuginfo.t */ 
     99    CONTEXT(interp)->current_pc = NULL; 
     100 
    93101#ifdef HAVE_COMPUTED_GOTO 
    94102    pc = cg_core(pc, interp); 
    95103    return pc; 
  • t/op/debuginfo.t

     
    2323 
    2424=cut 
    2525 
    26 pasm_output_like( <<'CODE', <<'OUTPUT', "getline, getfile" ); 
     26$ENV{TEST_PROG_ARGS} ||= ''; 
     27my $nolineno = $ENV{TEST_PROG_ARGS} =~ /-f|-g/ 
     28    ? "\\(unknown file\\)\n-1" : "debuginfo_\\d+\\.pasm\n\\d"; 
     29 
     30pasm_output_like( <<'CODE', <<"OUTPUT", "getline, getfile" ); 
    2731.pcc_sub main: 
    2832    getfile S0 
    2933    getline I0 
     
    3337    print "\n" 
    3438    end 
    3539CODE 
    36 /debuginfo_\d+\.pasm 
    37 \d/ 
     40/$nolineno/ 
    3841OUTPUT 
    3942 
    4043pir_error_output_like( <<'CODE', <<'OUTPUT', "debug backtrace - Null PMC access" ); 
     
    159162called from Sub 'main' pc (\d+|-1) \(.*?:(\d+|-1)\)$/ 
    160163OUTPUT 
    161164 
     165$nolineno = $ENV{TEST_PROG_ARGS} =~ /-f|-g/ 
     166    ? '\(\(unknown file\):-1\)' : '\(xyz.pir:126\)'; 
     167 
    162168# See "RT #43269 and .annotate 
    163 pir_error_output_like( <<'CODE', <<'OUTPUT', "setfile and setline" ); 
     169pir_error_output_like( <<'CODE', <<"OUTPUT", "setfile and setline" ); 
    164170.sub main :main 
    165171    setfile "xyz.pir" 
    166172    setline 123 
     
    169175    'no_such_function'($S0, $I0) 
    170176.end 
    171177CODE 
    172 /\(xyz.pir:126\)/ 
     178/$nolineno/ 
    173179OUTPUT 
    174180 
     181$nolineno = $ENV{TEST_PROG_ARGS} =~ /-f|-g/ 
     182    ? '\(\(unknown file\):-1\)' : '\(foo.p6:128\)'; 
    175183# See "RT #43269 and .annotate 
    176 pir_error_output_like( <<'CODE', <<'OUTPUT', "setfile and setline" ); 
     184pir_error_output_like( <<'CODE', <<"OUTPUT", "setfile and setline" ); 
    177185.sub main :main 
    178186    setfile "foo.p6" 
    179187    setline 123 
     
    188196    'nsf'($P1) 
    189197.end 
    190198CODE 
    191 /\(foo.p6:128\)/ 
     199/$nolineno/ 
    192200OUTPUT 
    193201 
    194202# Local Variables: