diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-11-15 15:53:13 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-11-15 16:10:53 -0800 |
commit | 9d976ff5cc49c35e6ef2717c206d6a4db4793dec (patch) | |
tree | 8fc2d077af4fb74cbd9575dbea42399d79434183 /pp_ctl.c | |
parent | 576fa0247cb77313053597d85f630b37a7fa7d3e (diff) | |
download | perl-9d976ff5cc49c35e6ef2717c206d6a4db4793dec.tar.gz |
[perl #115742] Push a new pad for recursive DB::DB
When invoking the debugger recursively, pp_dbstate needs to push a new
pad (like pp_entersub) so that DB::DB doesn’t stomp on the lexical
variables belonging to the outer call.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2000,8 +2000,12 @@ PP(pp_dbstate) PUSHSUB_DB(cx); cx->blk_sub.retop = PL_op->op_next; CvDEPTH(cv)++; + if (CvDEPTH(cv) >= 2) { + PERL_STACK_OVERFLOW_CHECK(); + pad_push(CvPADLIST(cv), CvDEPTH(cv)); + } SAVECOMPPAD(); - PAD_SET_CUR_NOSAVE(CvPADLIST(cv), 1); + PAD_SET_CUR_NOSAVE(CvPADLIST(cv), CvDEPTH(cv)); RETURNOP(CvSTART(cv)); } } |