On Monday 02 June 2008 07:58:57 NotFound wrote: > Previous version generates a warning when building with C, fixed now.
I like the general idea, but I wonder if there's something cleaner than an environment variable. Nothing really comes to mind at the moment besides making argument processing even uglier in IMCC's main.c. Let's think about it for a little bit, but I really like the idea. One implementation comment: Index: src/runops_cores.c =================================================================== --- src/runops_cores.c (revisión: 28033) +++ src/runops_cores.c (copia de trabajo) @@ -242,13 +242,28 @@ opcode_t * runops_gc_debug_core(PARROT_INTERP, ARGIN(opcode_t *pc)) { + static int flag = 0; + static unsigned long counter= 0; + + if (! flag) { + char * str = getenv("PARROT_GCDEBUG_SKIP"); + if (str) + counter = strtoul(str, 0, 0); + flag= 1; + } + while (pc) { if (pc < code_start || pc >= code_end) real_exception(interp, NULL, 1, "attempt to access code outside of current code segment"); - Parrot_do_dod_run(interp, 0); - CONTEXT(interp)->current_pc = pc; + if (counter == 0) { + Parrot_do_dod_run(interp, 0); + CONTEXT(interp)->current_pc = pc; + } That pc assignment probably belongs outside the block. -- c