summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-09-30 23:48:56 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-09-30 23:48:56 -0700
commitbe1cc4519b5ba35ec8c5b8a2b4a62c72cff05a2e (patch)
tree30181d1d0ca0fd5011f945fc501790f5cd866bb4 /util.c
parentc059848dda15ddd2e5e825b0731428fe2ac3e644 (diff)
downloadperl-be1cc4519b5ba35ec8c5b8a2b4a62c72cff05a2e.tar.gz
[perl #48332] Debugger corrupts symbol table munging
This reverts commit 92adfbd49af0758bcc9a198cf2df2bd78c4176b9, which removed a necessary assignment for the sake of consting. In doing so, it allows subroutine redefinition to work properly again in the debugger.
Diffstat (limited to 'util.c')
-rw-r--r--util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/util.c b/util.c
index bed4c64629..75dbc1bf65 100644
--- a/util.c
+++ b/util.c
@@ -6526,13 +6526,17 @@ Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
PL_tainted = FALSE;
save_item(dbsv);
if (!PERLDB_SUB_NN) {
- GV * const gv = CvGV(cv);
+ GV *gv = CvGV(cv);
if ( svp && ((CvFLAGS(cv) & (CVf_ANON | CVf_CLONED))
|| strEQ(GvNAME(gv), "END")
|| ((GvCV(gv) != cv) && /* Could be imported, and old sub redefined. */
!( (SvTYPE(*svp) == SVt_PVGV)
- && (GvCV((const GV *)*svp) == cv) )))) {
+ && (GvCV((const GV *)*svp) == cv)
+ && (gv = (GV *)*svp)
+ )
+ )
+ )) {
/* Use GV from the stack as a fallback. */
/* GV is potentially non-unique, or contain different CV. */
SV * const tmp = newRV(MUTABLE_SV(cv));