summaryrefslogtreecommitdiff
path: root/deb.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-07-23 09:52:59 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-07-23 09:52:59 +0000
commitf39bc417872f70cd842818eabb72f1c97d78cdd2 (patch)
tree580290513860e81838a2510e5ea1fa7fc109e826 /deb.c
parent0dfdcd8a63a82bd61087d84a6f130e03a4b20ed9 (diff)
downloadperl-f39bc417872f70cd842818eabb72f1c97d78cdd2.tar.gz
remove the return stack PL_retstack, and store return ops in the CX
structure directly instead p4raw-id: //depot/perl@23156
Diffstat (limited to 'deb.c')
-rw-r--r--deb.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/deb.c b/deb.c
index 20fda2185d..f268216287 100644
--- a/deb.c
+++ b/deb.c
@@ -206,9 +206,9 @@ Perl_deb_stack_all(pTHX)
*/
I32 i, stack_min, stack_max, mark_min, mark_max;
- I32 ret_min, ret_max;
PERL_CONTEXT *cx_n;
PERL_SI *si_n;
+ OP *retop;
cx_n = Null(PERL_CONTEXT*);
@@ -257,27 +257,26 @@ Perl_deb_stack_all(pTHX)
}
mark_min = cx->blk_oldmarksp;
- ret_min = cx->blk_oldretsp;
if (cx_n) {
mark_max = cx_n->blk_oldmarksp;
- ret_max = cx_n->blk_oldretsp;
}
else {
mark_max = PL_markstack_ptr - PL_markstack;
- ret_max = PL_retstack_ix;
}
deb_stack_n(AvARRAY(si->si_stack),
stack_min, stack_max, mark_min, mark_max);
- if (ret_max > ret_min) {
+ if (CxTYPE(cx) == CXt_EVAL || CxTYPE(cx) == CXt_SUB
+ || CxTYPE(cx) == CXt_FORMAT)
+ {
+ retop = (CxTYPE(cx) == CXt_EVAL)
+ ? cx->blk_eval.retop : cx->blk_sub.retop;
+
PerlIO_printf(Perl_debug_log, " retop=%s\n",
- PL_retstack[ret_min]
- ? OP_NAME(PL_retstack[ret_min])
- : "(null)"
+ retop ? OP_NAME(retop) : "(null)"
);
}
-
}
} /* next context */