From: Vincent Pit Date: Mon, 18 Jan 2010 19:49:36 +0000 (+0100) Subject: More debugging info tweaks X-Git-Tag: v0.10~9 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Upper.git;a=commitdiff_plain;h=d0660de3be6b97fece8f48e4ca2f78e9a8ee7110 More debugging info tweaks --- diff --git a/Upper.xs b/Upper.xs index 612ce2e..d4e32cc 100644 --- a/Upper.xs +++ b/Upper.xs @@ -296,7 +296,7 @@ STATIC void su_call(pTHX_ void *ud_) { SU_D({ PerlIO_printf(Perl_debug_log, "%p: @@@ call\n%p: depth=%2d scope_ix=%2d save_ix=%2d\n", - ud, ud, PL_scopestack_ix, PL_savestack_ix); + ud, ud, SU_UD_DEPTH(ud), PL_scopestack_ix, PL_savestack_ix); }); ENTER; @@ -466,12 +466,13 @@ STATIC void su_pop(pTHX_ void *ud) { I32 depth, base, mark, *origin; depth = SU_UD_DEPTH(ud); - SU_D({ - PerlIO_printf(Perl_debug_log, "%p: --- pop a %s\n", ud, SU_CXNAME); + SU_D( PerlIO_printf(Perl_debug_log, - "%p: leave scope at depth=%2d scope_ix=%2d cur_top=%2d cur_base=%2d\n", ud, - depth, PL_scopestack_ix, PL_savestack_ix, PL_scopestack[PL_scopestack_ix]); - }); + "%p: --- pop a %s\n" + "%p: leave scope at depth=%2d scope_ix=%2d cur_top=%2d cur_base=%2d\n", + ud, SU_CXNAME, + ud, depth, PL_scopestack_ix,PL_savestack_ix,PL_scopestack[PL_scopestack_ix]) + ); origin = SU_UD_ORIGIN(ud); mark = origin[depth]; @@ -479,7 +480,7 @@ STATIC void su_pop(pTHX_ void *ud) { SU_D(PerlIO_printf(Perl_debug_log, "%p: original scope was %*c top=%2d base=%2d\n", - ud, 20, ' ', mark, base)); + ud, 24, ' ', mark, base)); if (base < mark) { SU_D(PerlIO_printf(Perl_debug_log, "%p: clear leftovers\n", ud));