3 * Copyright (c) 1991-2001, Larry Wall
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
15 * "Away now, Shadowfax! Run, greatheart, run as you have never run before!
16 * Now we are come to the lands where you were foaled, and every stone you
17 * know. Run now! Hope is in speed!" --Gandalf
21 Perl_runops_standard(pTHX)
23 while ((PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX))) {
32 Perl_runops_debug(pTHX)
36 if (ckWARN_d(WARN_DEBUGGING))
37 Perl_warner(aTHX_ WARN_DEBUGGING, "NULL OP IN RUN");
44 if (PL_watchaddr != 0 && *PL_watchaddr != PL_watchok)
45 PerlIO_printf(Perl_debug_log,
46 "WARNING: %"UVxf" changed from %"UVxf" to %"UVxf"\n",
47 PTR2UV(PL_watchaddr), PTR2UV(PL_watchok),
48 PTR2UV(*PL_watchaddr));
50 DEBUG_t(debop(PL_op));
51 DEBUG_P(debprof(PL_op));
53 } while ((PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX)));
58 return runops_standard();
59 #endif /* DEBUGGING */
63 Perl_debop(pTHX_ OP *o)
69 Perl_deb(aTHX_ "%s", PL_op_name[o->op_type]);
72 PerlIO_printf(Perl_debug_log, "(%s)", SvPEEK(cSVOPo_sv));
78 gv_fullname3(sv, cGVOPo_gv, Nullch);
79 PerlIO_printf(Perl_debug_log, "(%s)", SvPV(sv, n_a));
83 PerlIO_printf(Perl_debug_log, "(NULL)");
88 /* print the lexical's name */
89 svp = av_fetch(PL_comppad_name, o->op_targ, FALSE);
91 PerlIO_printf(Perl_debug_log, "(%s)", SvPV(*svp,n_a));
93 PerlIO_printf(Perl_debug_log, "[%"UVuf"]", (UV)o->op_targ);
98 PerlIO_printf(Perl_debug_log, "\n");
99 #endif /* DEBUGGING */
104 Perl_watch(pTHX_ char **addr)
109 PerlIO_printf(Perl_debug_log, "WATCHING, %"UVxf" is currently %"UVxf"\n",
110 PTR2UV(PL_watchaddr), PTR2UV(PL_watchok));
111 #endif /* DEBUGGING */
115 S_debprof(pTHX_ OP *o)
119 Newz(000, PL_profiledata, MAXO, U32);
120 ++PL_profiledata[o->op_type];
121 #endif /* DEBUGGING */
125 Perl_debprofdump(pTHX)
131 for (i = 0; i < MAXO; i++) {
132 if (PL_profiledata[i])
133 PerlIO_printf(Perl_debug_log,
134 "%5lu %s\n", (unsigned long)PL_profiledata[i],
137 #endif /* DEBUGGING */