summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-23 14:00:27 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-23 14:00:27 +0000
commit4f01c5a5705fca4c6743c9938e82ea378a5b35e8 (patch)
treea63da0a5497e6a762b88919cd938aa2ac1a37d83 /pp_hot.c
parente55aaa0ea8ae9df2251fb793d58ce52f2d4ed736 (diff)
downloadperl-4f01c5a5705fca4c6743c9938e82ea378a5b35e8.tar.gz
Fix pp_hot.c:get_db_sub core dump when perl debugger used.
p4raw-id: //depot/perl@171
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/pp_hot.c b/pp_hot.c
index bc46cca740..f4741a1d68 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");