3 * Copyright (c) 1991-2000, 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.
11 * "For the fashion of Minas Tirith was such that it was built on seven
16 #define PERL_IN_SCOPE_C
19 #if defined(PERL_FLEXIBLE_EXCEPTIONS)
21 Perl_default_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt,
22 protect_body_t body, ...)
27 ret = vdefault_protect(pcur_env, excpt, body, &args);
33 Perl_vdefault_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt,
34 protect_body_t body, va_list *args)
44 ret = CALL_FPTR(body)(aTHX_ *args);
52 Perl_stack_grow(pTHX_ SV **sp, SV **p, int n)
55 #if defined(DEBUGGING) && !defined(USE_THREADS)
56 static int growing = 0;
61 #ifndef STRESS_REALLOC
62 av_extend(PL_curstack, (p - PL_stack_base) + (n) + 128);
64 av_extend(PL_curstack, (p - PL_stack_base) + (n) + 1);
66 #if defined(DEBUGGING) && !defined(USE_THREADS)
72 #ifndef STRESS_REALLOC
73 #define GROW(old) ((old) * 3 / 2)
75 #define GROW(old) ((old) + 1)
79 Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems)
82 New(56, si, 1, PERL_SI);
83 si->si_stack = newAV();
84 AvREAL_off(si->si_stack);
85 av_extend(si->si_stack, stitems > 0 ? stitems-1 : 0);
86 AvALLOC(si->si_stack)[0] = &PL_sv_undef;
87 AvFILLp(si->si_stack) = 0;
90 si->si_cxmax = cxitems - 1;
92 si->si_type = PERLSI_UNDEF;
93 New(56, si->si_cxstack, cxitems, PERL_CONTEXT);
101 cxstack_max = GROW(cxstack_max);
102 Renew(cxstack, cxstack_max + 1, PERL_CONTEXT); /* XXX should fix CXINC macro */
103 return cxstack_ix + 1;
107 Perl_push_return(pTHX_ OP *retop)
110 if (PL_retstack_ix == PL_retstack_max) {
111 PL_retstack_max = GROW(PL_retstack_max);
112 Renew(PL_retstack, PL_retstack_max, OP*);
114 PL_retstack[PL_retstack_ix++] = retop;
118 Perl_pop_return(pTHX)
121 if (PL_retstack_ix > 0)
122 return PL_retstack[--PL_retstack_ix];
128 Perl_push_scope(pTHX)
131 if (PL_scopestack_ix == PL_scopestack_max) {
132 PL_scopestack_max = GROW(PL_scopestack_max);
133 Renew(PL_scopestack, PL_scopestack_max, I32);
135 PL_scopestack[PL_scopestack_ix++] = PL_savestack_ix;
143 I32 oldsave = PL_scopestack[--PL_scopestack_ix];
144 LEAVE_SCOPE(oldsave);
148 Perl_markstack_grow(pTHX)
151 I32 oldmax = PL_markstack_max - PL_markstack;
152 I32 newmax = GROW(oldmax);
154 Renew(PL_markstack, newmax, I32);
155 PL_markstack_ptr = PL_markstack + oldmax;
156 PL_markstack_max = PL_markstack + newmax;
160 Perl_savestack_grow(pTHX)
163 PL_savestack_max = GROW(PL_savestack_max) + 4;
164 Renew(PL_savestack, PL_savestack_max, ANY);
170 Perl_tmps_grow(pTHX_ I32 n)
173 #ifndef STRESS_REALLOC
175 n = (PL_tmps_max < 512) ? 128 : 512;
177 PL_tmps_max = PL_tmps_ix + n + 1;
178 Renew(PL_tmps_stack, PL_tmps_max, SV*);
186 /* XXX should tmps_floor live in cxstack? */
187 I32 myfloor = PL_tmps_floor;
188 while (PL_tmps_ix > myfloor) { /* clean up after last statement */
189 SV* sv = PL_tmps_stack[PL_tmps_ix];
190 PL_tmps_stack[PL_tmps_ix--] = Nullsv;
193 SvREFCNT_dec(sv); /* note, can modify tmps_ix!!! */
199 S_save_scalar_at(pTHX_ SV **sptr)
205 sv = *sptr = NEWSV(0,0);
206 if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv) && SvTYPE(osv) != SVt_PVGV) {
207 sv_upgrade(sv, SvTYPE(osv));
208 if (SvGMAGICAL(osv)) {
210 bool oldtainted = PL_tainted;
212 if (PL_tainting && PL_tainted && (mg = mg_find(osv, 't'))) {
213 SAVESPTR(mg->mg_obj);
216 SvFLAGS(osv) |= (SvFLAGS(osv) &
217 (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
218 PL_tainted = oldtainted;
220 SvMAGIC(sv) = SvMAGIC(osv);
221 SvFLAGS(sv) |= SvMAGICAL(osv);
230 Perl_save_scalar(pTHX_ GV *gv)
233 SV **sptr = &GvSV(gv);
235 SSPUSHPTR(SvREFCNT_inc(gv));
236 SSPUSHPTR(SvREFCNT_inc(*sptr));
238 return save_scalar_at(sptr);
242 Perl_save_svref(pTHX_ SV **sptr)
247 SSPUSHPTR(SvREFCNT_inc(*sptr));
248 SSPUSHINT(SAVEt_SVREF);
249 return save_scalar_at(sptr);
252 /* Like save_sptr(), but also SvREFCNT_dec()s the new value. Can be used to
253 * restore a global SV to its prior contents, freeing new value. */
255 Perl_save_generic_svref(pTHX_ SV **sptr)
260 SSPUSHPTR(SvREFCNT_inc(*sptr));
261 SSPUSHINT(SAVEt_GENERIC_SVREF);
264 /* Like save_pptr(), but also Safefree()s the new value if it is different
265 * from the old one. Can be used to restore a global char* to its prior
266 * contents, freeing new value. */
268 Perl_save_generic_pvref(pTHX_ char **str)
274 SSPUSHINT(SAVEt_GENERIC_PVREF);
278 Perl_save_gp(pTHX_ GV *gv, I32 empty)
282 SSPUSHIV((IV)SvLEN(gv));
283 SvLEN(gv) = 0; /* forget that anything was allocated here */
284 SSPUSHIV((IV)SvCUR(gv));
285 SSPUSHPTR(SvPVX(gv));
287 SSPUSHPTR(SvREFCNT_inc(gv));
294 Newz(602, gp, 1, GP);
297 PL_sub_generation++; /* taking a method out of circulation */
298 if (GvIOp(gv) && (IoFLAGS(GvIOp(gv)) & IOf_ARGV)) {
300 IoFLAGS(gp->gp_io) |= IOf_ARGV|IOf_START;
302 GvGP(gv) = gp_ref(gp);
303 GvSV(gv) = NEWSV(72,0);
304 GvLINE(gv) = CopLINE(PL_curcop);
314 Perl_save_ary(pTHX_ GV *gv)
320 if (!AvREAL(oav) && AvREIFY(oav))
327 GvAV(gv) = Null(AV*);
330 SvMAGIC(av) = SvMAGIC(oav);
331 SvFLAGS((SV*)av) |= SvMAGICAL(oav);
342 Perl_save_hash(pTHX_ GV *gv)
349 SSPUSHPTR(ohv = GvHVn(gv));
352 GvHV(gv) = Null(HV*);
355 SvMAGIC(hv) = SvMAGIC(ohv);
356 SvFLAGS((SV*)hv) |= SvMAGICAL(ohv);
367 Perl_save_item(pTHX_ register SV *item)
370 register SV *sv = NEWSV(0,0);
374 SSPUSHPTR(item); /* remember the pointer */
375 SSPUSHPTR(sv); /* remember the value */
376 SSPUSHINT(SAVEt_ITEM);
380 Perl_save_int(pTHX_ int *intp)
386 SSPUSHINT(SAVEt_INT);
390 Perl_save_long(pTHX_ long int *longp)
396 SSPUSHINT(SAVEt_LONG);
400 Perl_save_I32(pTHX_ I32 *intp)
406 SSPUSHINT(SAVEt_I32);
410 Perl_save_I16(pTHX_ I16 *intp)
416 SSPUSHINT(SAVEt_I16);
420 Perl_save_I8(pTHX_ I8 *bytep)
430 Perl_save_iv(pTHX_ IV *ivp)
439 /* Cannot use save_sptr() to store a char* since the SV** cast will
440 * force word-alignment and we'll miss the pointer.
443 Perl_save_pptr(pTHX_ char **pptr)
449 SSPUSHINT(SAVEt_PPTR);
453 Perl_save_vptr(pTHX_ void *ptr)
457 SSPUSHPTR(*(char**)ptr);
459 SSPUSHINT(SAVEt_VPTR);
463 Perl_save_sptr(pTHX_ SV **sptr)
469 SSPUSHINT(SAVEt_SPTR);
473 Perl_save_threadsv(pTHX_ PADOFFSET i)
477 SV **svp = &THREADSV(i); /* XXX Change to save by offset */
478 DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %"UVuf": %p %p:%s\n",
479 (UV)i, svp, *svp, SvPEEK(*svp)));
483 Perl_croak(aTHX_ "panic: save_threadsv called in non-threaded perl");
485 #endif /* USE_THREADS */
489 Perl_save_nogv(pTHX_ GV *gv)
494 SSPUSHINT(SAVEt_NSTAB);
498 Perl_save_hptr(pTHX_ HV **hptr)
504 SSPUSHINT(SAVEt_HPTR);
508 Perl_save_aptr(pTHX_ AV **aptr)
514 SSPUSHINT(SAVEt_APTR);
518 Perl_save_freesv(pTHX_ SV *sv)
523 SSPUSHINT(SAVEt_FREESV);
527 Perl_save_freeop(pTHX_ OP *o)
532 SSPUSHINT(SAVEt_FREEOP);
536 Perl_save_freepv(pTHX_ char *pv)
541 SSPUSHINT(SAVEt_FREEPV);
545 Perl_save_clearsv(pTHX_ SV **svp)
549 SSPUSHLONG((long)(svp-PL_curpad));
550 SSPUSHINT(SAVEt_CLEARSV);
554 Perl_save_delete(pTHX_ HV *hv, char *key, I32 klen)
560 SSPUSHPTR(SvREFCNT_inc(hv));
561 SSPUSHINT(SAVEt_DELETE);
565 Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg)
571 for (i = 1; i <= maxsarg; i++) {
573 sv_setsv(sv,sarg[i]);
575 SSPUSHPTR(sarg[i]); /* remember the pointer */
576 SSPUSHPTR(sv); /* remember the value */
577 SSPUSHINT(SAVEt_ITEM);
582 Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p)
588 SSPUSHINT(SAVEt_DESTRUCTOR);
592 Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p)
598 SSPUSHINT(SAVEt_DESTRUCTOR_X);
602 Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr)
606 SSPUSHPTR(SvREFCNT_inc(av));
608 SSPUSHPTR(SvREFCNT_inc(*sptr));
609 SSPUSHINT(SAVEt_AELEM);
610 save_scalar_at(sptr);
614 Perl_save_helem(pTHX_ HV *hv, SV *key, SV **sptr)
618 SSPUSHPTR(SvREFCNT_inc(hv));
619 SSPUSHPTR(SvREFCNT_inc(key));
620 SSPUSHPTR(SvREFCNT_inc(*sptr));
621 SSPUSHINT(SAVEt_HELEM);
622 save_scalar_at(sptr);
635 Perl_save_alloc(pTHX_ I32 size, I32 pad)
638 register I32 start = pad + ((char*)&PL_savestack[PL_savestack_ix]
639 - (char*)PL_savestack);
640 register I32 elems = 1 + ((size + pad - 1) / sizeof(*PL_savestack));
642 /* SSCHECK may not be good enough */
643 while (PL_savestack_ix + elems + 2 > PL_savestack_max)
646 PL_savestack_ix += elems;
648 SSPUSHINT(SAVEt_ALLOC);
653 Perl_leave_scope(pTHX_ I32 base)
666 Perl_croak(aTHX_ "panic: corrupt saved stack index");
667 while (PL_savestack_ix > base) {
669 case SAVEt_ITEM: /* normal string */
670 value = (SV*)SSPOPPTR;
672 sv_replace(sv,value);
677 case SAVEt_SV: /* scalar reference */
678 value = (SV*)SSPOPPTR;
683 case SAVEt_GENERIC_PVREF: /* generic pv */
684 str = (char*)SSPOPPTR;
686 if (*(char**)ptr != str) {
687 Safefree(*(char**)ptr);
691 case SAVEt_GENERIC_SVREF: /* generic sv */
692 value = (SV*)SSPOPPTR;
699 case SAVEt_SVREF: /* scalar reference */
700 value = (SV*)SSPOPPTR;
704 DEBUG_S(PerlIO_printf(Perl_debug_log,
705 "restore svref: %p %p:%s -> %p:%s\n",
706 ptr, sv, SvPEEK(sv), value, SvPEEK(value)));
707 if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv) &&
708 SvTYPE(sv) != SVt_PVGV)
710 (void)SvUPGRADE(value, SvTYPE(sv));
711 SvMAGIC(value) = SvMAGIC(sv);
712 SvFLAGS(value) |= SvMAGICAL(sv);
716 else if (SvTYPE(value) >= SVt_PVMG && SvMAGIC(value) &&
717 SvTYPE(value) != SVt_PVGV)
719 SvFLAGS(value) |= (SvFLAGS(value) &
720 (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
721 SvMAGICAL_off(value);
731 case SAVEt_AV: /* array reference */
735 AV *goner = GvAV(gv);
736 SvMAGIC(av) = SvMAGIC(goner);
737 SvFLAGS((SV*)av) |= SvMAGICAL(goner);
738 SvMAGICAL_off(goner);
749 case SAVEt_HV: /* hash reference */
753 HV *goner = GvHV(gv);
754 SvMAGIC(hv) = SvMAGIC(goner);
755 SvFLAGS(hv) |= SvMAGICAL(goner);
756 SvMAGICAL_off(goner);
767 case SAVEt_INT: /* int reference */
769 *(int*)ptr = (int)SSPOPINT;
771 case SAVEt_LONG: /* long reference */
773 *(long*)ptr = (long)SSPOPLONG;
775 case SAVEt_I32: /* I32 reference */
777 *(I32*)ptr = (I32)SSPOPINT;
779 case SAVEt_I16: /* I16 reference */
781 *(I16*)ptr = (I16)SSPOPINT;
783 case SAVEt_I8: /* I8 reference */
785 *(I8*)ptr = (I8)SSPOPINT;
787 case SAVEt_IV: /* IV reference */
789 *(IV*)ptr = (IV)SSPOPIV;
791 case SAVEt_SPTR: /* SV* reference */
793 *(SV**)ptr = (SV*)SSPOPPTR;
795 case SAVEt_VPTR: /* random* reference */
796 case SAVEt_PPTR: /* char* reference */
798 *(char**)ptr = (char*)SSPOPPTR;
800 case SAVEt_HPTR: /* HV* reference */
802 *(HV**)ptr = (HV*)SSPOPPTR;
804 case SAVEt_APTR: /* AV* reference */
806 *(AV**)ptr = (AV*)SSPOPPTR;
810 (void)sv_clear((SV*)gv);
812 case SAVEt_GP: /* scalar reference */
815 if (SvPVX(gv) && SvLEN(gv) > 0) {
818 SvPVX(gv) = (char *)SSPOPPTR;
819 SvCUR(gv) = (STRLEN)SSPOPIV;
820 SvLEN(gv) = (STRLEN)SSPOPIV;
824 PL_sub_generation++; /* putting a method back into circulation */
829 SvREFCNT_dec((SV*)ptr);
834 PL_curpad = AvARRAY(PL_comppad);
839 Safefree((char*)ptr);
842 ptr = (void*)&PL_curpad[SSPOPLONG];
844 /* Can clear pad variable in place? */
845 if (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) {
846 if (SvTHINKFIRST(sv))
851 switch (SvTYPE(sv)) {
861 Perl_croak(aTHX_ "panic: leave_scope pad code");
873 else { /* Someone has a claim on this, so abandon it. */
874 U32 padflags = SvFLAGS(sv) & (SVs_PADBUSY|SVs_PADMY|SVs_PADTMP);
875 switch (SvTYPE(sv)) { /* Console ourselves with a new value */
876 case SVt_PVAV: *(SV**)ptr = (SV*)newAV(); break;
877 case SVt_PVHV: *(SV**)ptr = (SV*)newHV(); break;
878 default: *(SV**)ptr = NEWSV(0,0); break;
880 SvREFCNT_dec(sv); /* Cast current value to the winds. */
881 SvFLAGS(*(SV**)ptr) |= padflags; /* preserve pad nature */
888 (void)hv_delete(hv, (char*)ptr, (U32)SSPOPINT, G_DISCARD);
892 case SAVEt_DESTRUCTOR:
896 case SAVEt_DESTRUCTOR_X:
898 (*SSPOPDXPTR)(aTHXo_ ptr);
900 case SAVEt_REGCONTEXT:
903 PL_savestack_ix -= i; /* regexp must have croaked */
905 case SAVEt_STACK_POS: /* Position on Perl stack */
907 PL_stack_sp = PL_stack_base + i;
909 case SAVEt_AELEM: /* array element */
910 value = (SV*)SSPOPPTR;
913 ptr = av_fetch(av,i,1);
916 if (sv && sv != &PL_sv_undef) {
917 if (SvTIED_mg((SV*)av, 'P'))
918 (void)SvREFCNT_inc(sv);
926 case SAVEt_HELEM: /* hash element */
927 value = (SV*)SSPOPPTR;
930 ptr = hv_fetch_ent(hv, sv, 1, 0);
932 SV *oval = HeVAL((HE*)ptr);
933 if (oval && oval != &PL_sv_undef) {
934 ptr = &HeVAL((HE*)ptr);
935 if (SvTIED_mg((SV*)hv, 'P'))
936 (void)SvREFCNT_inc(*(SV**)ptr);
947 PL_op = (OP*)SSPOPPTR;
950 if (GvHV(PL_hintgv)) {
951 SvREFCNT_dec((SV*)GvHV(PL_hintgv));
952 GvHV(PL_hintgv) = NULL;
954 *(I32*)&PL_hints = (I32)SSPOPINT;
957 PL_comppad = (AV*)SSPOPPTR;
959 PL_curpad = AvARRAY(PL_comppad);
961 PL_curpad = Null(SV**);
964 Perl_croak(aTHX_ "panic: leave_scope inconsistency");
970 Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
974 PerlIO_printf(Perl_debug_log, "CX %ld = %s\n", (long)(cx - cxstack), PL_block_type[CxTYPE(cx)]);
975 if (CxTYPE(cx) != CXt_SUBST) {
976 PerlIO_printf(Perl_debug_log, "BLK_OLDSP = %ld\n", (long)cx->blk_oldsp);
977 PerlIO_printf(Perl_debug_log, "BLK_OLDCOP = 0x%"UVxf"\n",
978 PTR2UV(cx->blk_oldcop));
979 PerlIO_printf(Perl_debug_log, "BLK_OLDMARKSP = %ld\n", (long)cx->blk_oldmarksp);
980 PerlIO_printf(Perl_debug_log, "BLK_OLDSCOPESP = %ld\n", (long)cx->blk_oldscopesp);
981 PerlIO_printf(Perl_debug_log, "BLK_OLDRETSP = %ld\n", (long)cx->blk_oldretsp);
982 PerlIO_printf(Perl_debug_log, "BLK_OLDPM = 0x%"UVxf"\n",
983 PTR2UV(cx->blk_oldpm));
984 PerlIO_printf(Perl_debug_log, "BLK_GIMME = %s\n", cx->blk_gimme ? "LIST" : "SCALAR");
986 switch (CxTYPE(cx)) {
991 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
992 PTR2UV(cx->blk_sub.cv));
993 PerlIO_printf(Perl_debug_log, "BLK_SUB.GV = 0x%"UVxf"\n",
994 PTR2UV(cx->blk_sub.gv));
995 PerlIO_printf(Perl_debug_log, "BLK_SUB.DFOUTGV = 0x%"UVxf"\n",
996 PTR2UV(cx->blk_sub.dfoutgv));
997 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
998 (int)cx->blk_sub.hasargs);
1001 PerlIO_printf(Perl_debug_log, "BLK_SUB.CV = 0x%"UVxf"\n",
1002 PTR2UV(cx->blk_sub.cv));
1003 PerlIO_printf(Perl_debug_log, "BLK_SUB.OLDDEPTH = %ld\n",
1004 (long)cx->blk_sub.olddepth);
1005 PerlIO_printf(Perl_debug_log, "BLK_SUB.HASARGS = %d\n",
1006 (int)cx->blk_sub.hasargs);
1007 PerlIO_printf(Perl_debug_log, "BLK_SUB.LVAL = %d\n",
1008 (int)cx->blk_sub.lval);
1011 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_IN_EVAL = %ld\n",
1012 (long)cx->blk_eval.old_in_eval);
1013 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_OP_TYPE = %s (%s)\n",
1014 PL_op_name[cx->blk_eval.old_op_type],
1015 PL_op_desc[cx->blk_eval.old_op_type]);
1016 if (cx->blk_eval.old_namesv)
1017 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n",
1018 SvPVX(cx->blk_eval.old_namesv));
1019 PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_EVAL_ROOT = 0x%"UVxf"\n",
1020 PTR2UV(cx->blk_eval.old_eval_root));
1024 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LABEL = %s\n",
1025 cx->blk_loop.label);
1026 PerlIO_printf(Perl_debug_log, "BLK_LOOP.RESETSP = %ld\n",
1027 (long)cx->blk_loop.resetsp);
1028 PerlIO_printf(Perl_debug_log, "BLK_LOOP.REDO_OP = 0x%"UVxf"\n",
1029 PTR2UV(cx->blk_loop.redo_op));
1030 PerlIO_printf(Perl_debug_log, "BLK_LOOP.NEXT_OP = 0x%"UVxf"\n",
1031 PTR2UV(cx->blk_loop.next_op));
1032 PerlIO_printf(Perl_debug_log, "BLK_LOOP.LAST_OP = 0x%"UVxf"\n",
1033 PTR2UV(cx->blk_loop.last_op));
1034 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERIX = %ld\n",
1035 (long)cx->blk_loop.iterix);
1036 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%"UVxf"\n",
1037 PTR2UV(cx->blk_loop.iterary));
1038 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n",
1039 PTR2UV(CxITERVAR(cx)));
1041 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERSAVE = 0x%"UVxf"\n",
1042 PTR2UV(cx->blk_loop.itersave));
1043 PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERLVAL = 0x%"UVxf"\n",
1044 PTR2UV(cx->blk_loop.iterlval));
1048 PerlIO_printf(Perl_debug_log, "SB_ITERS = %ld\n",
1049 (long)cx->sb_iters);
1050 PerlIO_printf(Perl_debug_log, "SB_MAXITERS = %ld\n",
1051 (long)cx->sb_maxiters);
1052 PerlIO_printf(Perl_debug_log, "SB_RFLAGS = %ld\n",
1053 (long)cx->sb_rflags);
1054 PerlIO_printf(Perl_debug_log, "SB_ONCE = %ld\n",
1056 PerlIO_printf(Perl_debug_log, "SB_ORIG = %s\n",
1058 PerlIO_printf(Perl_debug_log, "SB_DSTR = 0x%"UVxf"\n",
1059 PTR2UV(cx->sb_dstr));
1060 PerlIO_printf(Perl_debug_log, "SB_TARG = 0x%"UVxf"\n",
1061 PTR2UV(cx->sb_targ));
1062 PerlIO_printf(Perl_debug_log, "SB_S = 0x%"UVxf"\n",
1064 PerlIO_printf(Perl_debug_log, "SB_M = 0x%"UVxf"\n",
1066 PerlIO_printf(Perl_debug_log, "SB_STREND = 0x%"UVxf"\n",
1067 PTR2UV(cx->sb_strend));
1068 PerlIO_printf(Perl_debug_log, "SB_RXRES = 0x%"UVxf"\n",
1069 PTR2UV(cx->sb_rxres));
1072 #endif /* DEBUGGING */