From: Malcolm Beattie Date: Thu, 23 Oct 1997 14:00:27 +0000 (+0000) Subject: Fix pp_hot.c:get_db_sub core dump when perl debugger used. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f01c5a5705fca4c6743c9938e82ea378a5b35e8;p=p5sagit%2Fp5-mst-13.2.git Fix pp_hot.c:get_db_sub core dump when perl debugger used. p4raw-id: //depot/perl@171 --- diff --git a/pp_hot.c b/pp_hot.c index bc46cca..f4741a1 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1713,16 +1713,16 @@ PP(pp_leavesub) } static CV * -get_db_sub(sv) -SV *sv; +get_db_sub(svp, cv) +SV **svp; +CV *cv; { dTHR; - SV *oldsv = sv; + SV *oldsv = *svp; GV *gv; - CV *cv; - sv = GvSV(DBsub); - save_item(sv); + *svp = GvSV(DBsub); + save_item(*svp); gv = CvGV(cv); if ( (CvFLAGS(cv) & (CVf_ANON | CVf_CLONED)) || strEQ(GvNAME(gv), "END") @@ -1731,10 +1731,10 @@ SV *sv; && (gv = (GV*)oldsv) ))) { /* Use GV from the stack as a fallback. */ /* GV is potentially non-unique, or contain different CV. */ - sv_setsv(sv, newRV((SV*)cv)); + sv_setsv(*svp, newRV((SV*)cv)); } else { - gv_efullname3(sv, gv, Nullch); + gv_efullname3(*svp, gv, Nullch); } cv = GvCV(DBsub); if (CvXSUB(cv)) @@ -1827,7 +1827,7 @@ PP(pp_entersub) gimme = GIMME_V; if ((op->op_private & OPpENTERSUB_DB) && GvCV(DBsub) && !CvNODEBUG(cv)) - cv = get_db_sub(sv); + cv = get_db_sub(&sv, cv); if (!cv) DIE("No DBsub routine");