diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-09-30 23:48:56 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-09-30 23:48:56 -0700 |
commit | be1cc4519b5ba35ec8c5b8a2b4a62c72cff05a2e (patch) | |
tree | 30181d1d0ca0fd5011f945fc501790f5cd866bb4 /util.c | |
parent | c059848dda15ddd2e5e825b0731428fe2ac3e644 (diff) | |
download | perl-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.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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)); |