summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mg.c9
-rw-r--r--op.h2
-rw-r--r--pp_ctl.c3
3 files changed, 11 insertions, 3 deletions
diff --git a/mg.c b/mg.c
index 0e34080817..fae5cda8dd 100644
--- a/mg.c
+++ b/mg.c
@@ -1458,8 +1458,13 @@ Perl_magic_setdbline(pTHX_ SV *sv, MAGIC *mg)
i = SvTRUE(sv);
svp = av_fetch(GvAV(gv),
atoi(MgPV(mg,n_a)), FALSE);
- if (svp && SvIOKp(*svp) && (o = INT2PTR(OP*,SvIVX(*svp))))
- o->op_private = (U8)i;
+ if (svp && SvIOKp(*svp) && (o = INT2PTR(OP*,SvIVX(*svp)))) {
+ /* set or clear breakpoint in the relevant control op */
+ if (i)
+ o->op_flags |= OPf_SPECIAL;
+ else
+ o->op_flags &= ~OPf_SPECIAL;
+ }
return 0;
}
diff --git a/op.h b/op.h
index 323a487437..7f9adc27ef 100644
--- a/op.h
+++ b/op.h
@@ -97,6 +97,8 @@ Deprecated. Use C<GIMME_V> instead.
/* On regcomp, "use re 'eval'" was in scope */
/* On OP_READLINE, was <$filehandle> */
/* On RV2[SG]V, don't create GV--in defined()*/
+ /* On OP_DBSTATE, indicates breakpoint
+ * (runtime property) */
/* old names; don't use in new code, but don't break them, either */
#define OPf_LIST OPf_WANT_LIST
diff --git a/pp_ctl.c b/pp_ctl.c
index 1a3fd1de0c..2e302ed6e6 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1583,7 +1583,8 @@ PP(pp_dbstate)
PL_stack_sp = PL_stack_base + cxstack[cxstack_ix].blk_oldsp;
FREETMPS;
- if (PL_op->op_private || SvIV(PL_DBsingle) || SvIV(PL_DBsignal) || SvIV(PL_DBtrace))
+ if (PL_op->op_flags & OPf_SPECIAL /* breakpoint */
+ || SvIV(PL_DBsingle) || SvIV(PL_DBsignal) || SvIV(PL_DBtrace))
{
dSP;
register CV *cv;