]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commitdiff
Add some debug tracing code to su_unwind()
authorVincent Pit <vince@profvince.com>
Sun, 11 Jan 2009 12:08:45 +0000 (13:08 +0100)
committerVincent Pit <vince@profvince.com>
Sun, 11 Jan 2009 12:08:45 +0000 (13:08 +0100)
Upper.xs

index 8e7356d71207200ad0b2ba23af62046405cc3e3f..486c28b5ef4707f665e3e2d2752d2849c5d2de7f 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -546,6 +546,14 @@ STATIC void su_unwind(pTHX_ void *ud_) {
   *PL_markstack_ptr = PL_stack_sp - PL_stack_base - items;
  }
 
+ SU_D({
+  PerlIO_printf(Perl_debug_log,
+                "%p: cx=%d gimme=%s items=%d sp=%d oldmark=%d mark=%d\n",
+                ud, cxix,
+                gimme == G_VOID ? "void" : gimme == G_ARRAY ? "list" : "scalar",
+                items, PL_stack_sp - PL_stack_base, *PL_markstack_ptr, mark);
+ });
+
  PL_op = PL_ppaddr[OP_RETURN](aTHX);
  *PL_markstack_ptr = mark;