diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-08-01 22:22:51 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-08-01 22:22:51 +0000 |
commit | cf2093f6405d08be483e037b6052608c46952a75 (patch) | |
tree | a2572a825ae30eabcd1fee0cac65751bef6a4d05 /dump.c | |
parent | ad7e816fc202b9506cd8e0633196331ccf37f264 (diff) | |
download | perl-cf2093f6405d08be483e037b6052608c46952a75.tar.gz |
64-bit work. Now 32-bit platforms get a 100% make test
with -Duse64bits (using long long).
Tested in Solaris 2.6 sparc RH Linux 6.0 x86
(and Digital IX 4.0D, to get a true 64-bit opinion). Now e.g.
'print unpack "q", pack "q", 12345678901'
should work on such 32-bit platforms.
Still a lot of printf()s behind -D which wrongly assume
that %ld/%lx and (long) are a good combination.
Introducing a slew of new macros intended to be used in printf()
format strings: e. g. PERL_PRId64 is the string to be used
when printing an IV, printf("%" PERL_PRId64 "\n", iv).
The PRI... naming follows the C9X naming of <inttypes.h> macros.
p4raw-id: //depot/cfgperl@3861
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 186 |
1 files changed, 181 insertions, 5 deletions
@@ -288,10 +288,17 @@ Perl_sv_peek(pTHX_ SV *sv) RESTORE_NUMERIC_LOCAL(); } else if (SvIOKp(sv)) { /* XXXX: IV, UV? */ +#ifdef IV_IS_QUAD + if (SvIsUV(sv)) + Perl_sv_catpvf(aTHX_ t, "(%" PERL_PRIu64 ")",(UV)SvUVX(sv)); + else + Perl_sv_catpvf(aTHX_ t, "(%" PERL_PRId64 ")",(IV)SvIVX(sv)); +#else if (SvIsUV(sv)) Perl_sv_catpvf(aTHX_ t, "(%lu)",(unsigned long)SvUVX(sv)); else Perl_sv_catpvf(aTHX_ t, "(%ld)",(long)SvIVX(sv)); +#endif } else sv_catpv(t, "()"); @@ -397,7 +404,11 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o) Perl_dump_indent(aTHX_ level, file, "TARG = %d\n", o->op_targ); } #ifdef DUMPADDR - Perl_dump_indent(aTHX_ level, file, "ADDR = 0x%lx => 0x%lx\n",o, o->op_next); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, "ADDR = 0x%" PERL_PRIx64 " => 0x%" PERL_PRIx64 "\n", (IV)o, (IV)o->op_next); +#else + Perl_dump_indent(aTHX_ level, file, "ADDR = 0x%lx => 0x%lx\n", (long)o, (long)o->op_next); +#endif #endif if (o->op_flags) { SV *tmpsv = newSVpvn("", 0); @@ -752,10 +763,19 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo flags = SvFLAGS(sv); type = SvTYPE(sv); - Perl_sv_setpvf(aTHX_ d, "(0x%lx) at 0x%lx\n%*s REFCNT = %ld\n%*s FLAGS = (", - (unsigned long)SvANY(sv), (unsigned long)sv, - PL_dumpindent*level, "", (long)SvREFCNT(sv), - PL_dumpindent*level, ""); +#ifdef IV_IS_QUAD + Perl_sv_setpvf(aTHX_ d, + "(0x%" PERL_PRIx64") at 0x%" PERL_PRIx64 "\n%*s REFCNT = %" PERL_PRId64 "\n%*s FLAGS = (", + (UV)SvANY(sv), (UV)sv, + PL_dumpindent*level, "", (IV)SvREFCNT(sv), + PL_dumpindent*level, ""); +#else + Perl_sv_setpvf(aTHX_ d, + "(0x%lx) at 0x%lx\n%*s REFCNT = %ld\n%*s FLAGS = (", + (unsigned long)SvANY(sv), (unsigned long)sv, + PL_dumpindent*level, "", (long)SvREFCNT(sv), + PL_dumpindent*level, ""); +#endif if (flags & SVs_PADBUSY) sv_catpv(d, "PADBUSY,"); if (flags & SVs_PADTMP) sv_catpv(d, "PADTMP,"); @@ -885,21 +905,36 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo return; } if (type >= SVt_PVIV || type == SVt_IV) { +#ifdef IV_IS_QUAD + if (SvIsUV(sv)) + Perl_dump_indent(aTHX_ level, file, " UV = %" PERL_PRIu64, (UV)SvUVX(sv)); + else + Perl_dump_indent(aTHX_ level, file, " IV = %" PERL_PRId64, (IV)SvIVX(sv)); +#else if (SvIsUV(sv)) Perl_dump_indent(aTHX_ level, file, " UV = %lu", (unsigned long)SvUVX(sv)); else Perl_dump_indent(aTHX_ level, file, " IV = %ld", (long)SvIVX(sv)); +#endif if (SvOOK(sv)) PerlIO_printf(file, " (OFFSET)"); PerlIO_putc(file, '\n'); } if (type >= SVt_PVNV || type == SVt_NV) { RESTORE_NUMERIC_STANDARD(); +#ifdef USE_LONG_DOUBLE + Perl_dump_indent(aTHX_ level, file, " NV = %.*" PERL_PRIgldbl "\n", DBL_DIG, SvNVX(sv)); +#else Perl_dump_indent(aTHX_ level, file, " NV = %.*g\n", DBL_DIG, SvNVX(sv)); +#endif RESTORE_NUMERIC_LOCAL(); } if (SvROK(sv)) { +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " RV = 0x%" PERL_PRIx64 "\n", (IV)SvRV(sv)); +#else Perl_dump_indent(aTHX_ level, file, " RV = 0x%lx\n", (long)SvRV(sv)); +#endif if (nest < maxnest) do_sv_dump(level+1, file, SvRV(sv), nest+1, maxnest, dumpops, pvlim); return; @@ -908,12 +943,21 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo return; if (type <= SVt_PVLV) { if (SvPVX(sv)) { +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file," PV = 0x%" PERL_PRIx64 " ", (IV)SvPVX(sv)); +#else Perl_dump_indent(aTHX_ level, file," PV = 0x%lx ", (long)SvPVX(sv)); +#endif if (SvOOK(sv)) PerlIO_printf(file, "( %s . ) ", pv_display(d, SvPVX(sv)-SvIVX(sv), SvIVX(sv), 0, pvlim)); PerlIO_printf(file, "%s\n", pv_display(d, SvPVX(sv), SvCUR(sv), SvLEN(sv), pvlim)); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " CUR = %" PERL_PRId64 "\n", (IV)SvCUR(sv)); + Perl_dump_indent(aTHX_ level, file, " LEN = %" PERL_PRId64 "\n", (IV)SvLEN(sv)); +#else Perl_dump_indent(aTHX_ level, file, " CUR = %ld\n", (long)SvCUR(sv)); Perl_dump_indent(aTHX_ level, file, " LEN = %ld\n", (long)SvLEN(sv)); +#endif } else Perl_dump_indent(aTHX_ level, file, " PV = 0\n"); @@ -927,23 +971,43 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo switch (type) { case SVt_PVLV: Perl_dump_indent(aTHX_ level, file, " TYPE = %c\n", LvTYPE(sv)); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " TARGOFF = %" PERL_PRId64 "\n", (IV)LvTARGOFF(sv)); + Perl_dump_indent(aTHX_ level, file, " TARGLEN = %" PERL_PRId64 "\n", (IV)LvTARGLEN(sv)); + Perl_dump_indent(aTHX_ level, file, " TARG = 0x%" PERL_PRIx64 "\n", (IV)LvTARG(sv)); +#else Perl_dump_indent(aTHX_ level, file, " TARGOFF = %ld\n", (long)LvTARGOFF(sv)); Perl_dump_indent(aTHX_ level, file, " TARGLEN = %ld\n", (long)LvTARGLEN(sv)); Perl_dump_indent(aTHX_ level, file, " TARG = 0x%lx\n", (long)LvTARG(sv)); +#endif /* XXX level+1 ??? */ do_sv_dump(level, file, LvTARG(sv), nest+1, maxnest, dumpops, pvlim); break; case SVt_PVAV: +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%" PERL_PRIx64 , (IV)AvARRAY(sv)); +#else Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%lx", (long)AvARRAY(sv)); +#endif if (AvARRAY(sv) != AvALLOC(sv)) { PerlIO_printf(file, " (offset=%d)\n", (AvARRAY(sv) - AvALLOC(sv))); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " ALLOC = 0x%" PERL_PRIx64 "\n", (IV)AvALLOC(sv)); +#else Perl_dump_indent(aTHX_ level, file, " ALLOC = 0x%lx\n", (long)AvALLOC(sv)); +#endif } else PerlIO_putc(file, '\n'); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " FILL = %" PERL_PRId64 "\n", (IV)AvFILLp(sv)); + Perl_dump_indent(aTHX_ level, file, " MAX = %" PERL_PRId64 "\n", (IV)AvMAX(sv)); + Perl_dump_indent(aTHX_ level, file, " ARYLEN = 0x%" PERL_PRIx64 "\n", (IV)AvARYLEN(sv)); +#else Perl_dump_indent(aTHX_ level, file, " FILL = %ld\n", (long)AvFILLp(sv)); Perl_dump_indent(aTHX_ level, file, " MAX = %ld\n", (long)AvMAX(sv)); Perl_dump_indent(aTHX_ level, file, " ARYLEN = 0x%lx\n", (long)AvARYLEN(sv)); +#endif flags = AvFLAGS(sv); sv_setpv(d, ""); if (flags & AVf_REAL) sv_catpv(d, ",REAL"); @@ -955,14 +1019,22 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo for (count = 0; count <= av_len((AV*)sv) && count < maxnest; count++) { SV** elt = av_fetch((AV*)sv,count,0); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level + 1, file, "Elt No. %" PERL_PRId64 "\n", (IV)count); +#else Perl_dump_indent(aTHX_ level + 1, file, "Elt No. %ld\n", (long)count); +#endif if (elt) do_sv_dump(level+1, file, *elt, nest+1, maxnest, dumpops, pvlim); } } break; case SVt_PVHV: +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%" PERL_PRIx64,(IV)HvARRAY(sv)); +#else Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%lx",(long)HvARRAY(sv)); +#endif if (HvARRAY(sv) && HvKEYS(sv)) { /* Show distribution of HEs in the ARRAY */ int freq[200]; @@ -1007,13 +1079,25 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo Perl_dump_indent(aTHX_ level, file, " hash quality = %.1f%%", theoret/sum*100); } PerlIO_putc(file, '\n'); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " KEYS = %" PERL_PRId64 "\n", (IV)HvKEYS(sv)); + Perl_dump_indent(aTHX_ level, file, " FILL = %" PERL_PRId64 "\n", (IV)HvFILL(sv)); + Perl_dump_indent(aTHX_ level, file, " MAX = %" PERL_PRId64 "\n", (IV)HvMAX(sv)); + Perl_dump_indent(aTHX_ level, file, " RITER = %" PERL_PRId64 "\n", (IV)HvRITER(sv)); + Perl_dump_indent(aTHX_ level, file, " EITER = 0x%" PERL_PRIx64 "\n",(IV) HvEITER(sv)); +#else Perl_dump_indent(aTHX_ level, file, " KEYS = %ld\n", (long)HvKEYS(sv)); Perl_dump_indent(aTHX_ level, file, " FILL = %ld\n", (long)HvFILL(sv)); Perl_dump_indent(aTHX_ level, file, " MAX = %ld\n", (long)HvMAX(sv)); Perl_dump_indent(aTHX_ level, file, " RITER = %ld\n", (long)HvRITER(sv)); Perl_dump_indent(aTHX_ level, file, " EITER = 0x%lx\n",(long) HvEITER(sv)); +#endif if (HvPMROOT(sv)) +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " PMROOT = 0x%" PERL_PRIx64 "\n",(IV)HvPMROOT(sv)); +#else Perl_dump_indent(aTHX_ level, file, " PMROOT = 0x%lx\n",(long)HvPMROOT(sv)); +#endif if (HvNAME(sv)) Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", HvNAME(sv)); if (nest < maxnest && !HvEITER(sv)) { /* Try to preserve iterator */ @@ -1030,7 +1114,11 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo key = hv_iterkey(he, &len); elt = hv_iterval(hv, he); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level+1, file, "Elt %s HASH = 0x%" PERL_PRIx64 "\n", pv_display(d, key, len, 0, pvlim), hash); +#else Perl_dump_indent(aTHX_ level+1, file, "Elt %s HASH = 0x%lx\n", pv_display(d, key, len, 0, pvlim), hash); +#endif do_sv_dump(level+1, file, elt, nest+1, maxnest, dumpops, pvlim); } hv_iterinit(hv); /* Return to status quo */ @@ -1043,23 +1131,54 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo case SVt_PVFM: do_hv_dump(level, file, " COMP_STASH", CvSTASH(sv)); if (CvSTART(sv)) +#ifdef IV_IS_QAUD + Perl_dump_indent(aTHX_ level, file, " START = 0x%" PERL_PRIx64 " ===> %d\n", (IV)CvSTART(sv), CvSTART(sv)->op_seq); + Perl_dump_indent(aTHX_ level, file, " ROOT = 0x%" PERL_PRIx64 "\n", (IV)CvROOT(sv)); +#else Perl_dump_indent(aTHX_ level, file, " START = 0x%lx ===> %d\n", (long)CvSTART(sv), CvSTART(sv)->op_seq); Perl_dump_indent(aTHX_ level, file, " ROOT = 0x%lx\n", (long)CvROOT(sv)); +#endif if (CvROOT(sv) && dumpops) do_op_dump(level+1, file, CvROOT(sv)); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " XSUB = 0x%" PERL_PRIx64 "\n", (IV)CvXSUB(sv)); + Perl_dump_indent(aTHX_ level, file, " XSUBANY = %" PERL_PRId64 "\n", (IV)CvXSUBANY(sv).any_i32); +#else Perl_dump_indent(aTHX_ level, file, " XSUB = 0x%lx\n", (long)CvXSUB(sv)); Perl_dump_indent(aTHX_ level, file, " XSUBANY = %ld\n", (long)CvXSUBANY(sv).any_i32); +#endif do_gvgv_dump(level, file, " GVGV::GV", CvGV(sv)); do_gv_dump(level, file, " FILEGV", CvFILEGV(sv)); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " DEPTH = %" PERL_PRId64 "\n", (IV)CvDEPTH(sv)); +#else Perl_dump_indent(aTHX_ level, file, " DEPTH = %ld\n", (long)CvDEPTH(sv)); +#endif #ifdef USE_THREADS +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " MUTEXP = 0x%" PERL_PRIx64 "\n", (IV)CvMUTEXP(sv)); + Perl_dump_indent(aTHX_ level, file, " OWNER = 0x%" PERL_PRIx64 "\n", (IV)CvOWNER(sv)); +#else Perl_dump_indent(aTHX_ level, file, " MUTEXP = 0x%lx\n", (long)CvMUTEXP(sv)); Perl_dump_indent(aTHX_ level, file, " OWNER = 0x%lx\n", (long)CvOWNER(sv)); +#endif /* IV_IS_QUAD */ #endif /* USE_THREADS */ +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%" PERL_PRIx64 "\n", (UV)CvFLAGS(sv)); +#else Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%lx\n", (unsigned long)CvFLAGS(sv)); +#endif if (type == SVt_PVFM) +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " LINES = %" PERL_PRId64 "\n", (IV)FmLINES(sv)); +#else Perl_dump_indent(aTHX_ level, file, " LINES = %ld\n", (long)FmLINES(sv)); +#endif +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " PADLIST = 0x%" PERL_PRIx64 "\n", (IV)CvPADLIST(sv)); +#else Perl_dump_indent(aTHX_ level, file, " PADLIST = 0x%lx\n", (long)CvPADLIST(sv)); +#endif if (nest < maxnest && CvPADLIST(sv)) { AV* padlist = CvPADLIST(sv); AV* pad_name = (AV*)*av_fetch(padlist, 0, FALSE); @@ -1070,6 +1189,16 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo for (ix = 1; ix <= AvFILL(pad_name); ix++) { if (SvPOK(pname[ix])) +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, /* %5d below is enough whitespace. */ + file, + "%5d. 0x%" PERL_PRIx64 " (%s\"%s\" %" PERL_PRId64 "-%" PERL_PRId64 ")\n", + ix, ppad[ix], + SvFAKE(pname[ix]) ? "FAKE " : "", + SvPVX(pname[ix]), + (IV)SvNVX(pname[ix]), + (IV)SvIVX(pname[ix])); +#else Perl_dump_indent(aTHX_ level, /* %5d below is enough whitespace. */ file, "%5d. 0x%lx (%s\"%s\" %ld-%ld)\n", @@ -1078,10 +1207,20 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo SvPVX(pname[ix]), (long)I_32(SvNVX(pname[ix])), (long)SvIVX(pname[ix])); +#endif } } { CV *outside = CvOUTSIDE(sv); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " OUTSIDE = 0x%" PERL_PRIx64 " (%s)\n", + (IV)outside, + (!outside ? "null" + : CvANON(outside) ? "ANON" + : (outside == PL_main_cv) ? "MAIN" + : CvUNIQUE(outside) ? "UNIQUE" + : CvGV(outside) ? GvNAME(CvGV(outside)) : "UNDEFINED")); +#else Perl_dump_indent(aTHX_ level, file, " OUTSIDE = 0x%lx (%s)\n", (long)outside, (!outside ? "null" @@ -1089,14 +1228,32 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo : (outside == PL_main_cv) ? "MAIN" : CvUNIQUE(outside) ? "UNIQUE" : CvGV(outside) ? GvNAME(CvGV(outside)) : "UNDEFINED")); +#endif } if (nest < maxnest && (CvCLONE(sv) || CvCLONED(sv))) do_sv_dump(level+1, file, (SV*)CvOUTSIDE(sv), nest+1, maxnest, dumpops, pvlim); break; case SVt_PVGV: Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", GvNAME(sv)); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " NAMELEN = %" PERL_PRId64 "\n", (IV)GvNAMELEN(sv)); +#else Perl_dump_indent(aTHX_ level, file, " NAMELEN = %ld\n", (long)GvNAMELEN(sv)); +#endif do_hv_dump (level, file, " GvSTASH", GvSTASH(sv)); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " GP = 0x%" PERL_PRIx64 "\n", (IV)GvGP(sv)); + Perl_dump_indent(aTHX_ level, file, " SV = 0x%" PERL_PRIx64 "\n", (IV)GvSV(sv)); + Perl_dump_indent(aTHX_ level, file, " REFCNT = %" PERL_PRId64 "\n", (IV)GvREFCNT(sv)); + Perl_dump_indent(aTHX_ level, file, " IO = 0x%" PERL_PRIx64 "\n", (IV)GvIOp(sv)); + Perl_dump_indent(aTHX_ level, file, " FORM = 0x%" PERL_PRIx64 " \n", (IV)GvFORM(sv)); + Perl_dump_indent(aTHX_ level, file, " AV = 0x%" PERL_PRIx64 "\n", (IV)GvAV(sv)); + Perl_dump_indent(aTHX_ level, file, " HV = 0x%" PERL_PRIx64 "\n", (IV)GvHV(sv)); + Perl_dump_indent(aTHX_ level, file, " CV = 0x%" PERL_PRIx64 "\n", (IV)GvCV(sv)); + Perl_dump_indent(aTHX_ level, file, " CVGEN = 0x%" PERL_PRIx64 "\n", (IV)GvCVGEN(sv)); + Perl_dump_indent(aTHX_ level, file, " LASTEXPR = %" PERL_PRId64 "\n", (IV)GvLASTEXPR(sv)); + Perl_dump_indent(aTHX_ level, file, " LINE = %" PERL_PRId64 "\n", (IV)GvLINE(sv)); +#else Perl_dump_indent(aTHX_ level, file, " GP = 0x%lx\n", (long)GvGP(sv)); Perl_dump_indent(aTHX_ level, file, " SV = 0x%lx\n", (long)GvSV(sv)); Perl_dump_indent(aTHX_ level, file, " REFCNT = %ld\n", (long)GvREFCNT(sv)); @@ -1108,11 +1265,21 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo Perl_dump_indent(aTHX_ level, file, " CVGEN = 0x%lx\n", (long)GvCVGEN(sv)); Perl_dump_indent(aTHX_ level, file, " LASTEXPR = %ld\n", (long)GvLASTEXPR(sv)); Perl_dump_indent(aTHX_ level, file, " LINE = %ld\n", (long)GvLINE(sv)); +#endif Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%x\n", (int)GvFLAGS(sv)); do_gv_dump (level, file, " FILEGV", GvFILEGV(sv)); do_gv_dump (level, file, " EGV", GvEGV(sv)); break; case SVt_PVIO: +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " IFP = 0x%" PERL_PRIx64 "\n", (IV)IoIFP(sv)); + Perl_dump_indent(aTHX_ level, file, " OFP = 0x%" PERL_PRIx64 "\n", (IV)IoOFP(sv)); + Perl_dump_indent(aTHX_ level, file, " DIRP = 0x%" PERL_PRIx64 "\n", (IV)IoDIRP(sv)); + Perl_dump_indent(aTHX_ level, file, " LINES = %" PERL_PRId64 "\n", (IV)IoLINES(sv)); + Perl_dump_indent(aTHX_ level, file, " PAGE = %" PERL_PRId64 "\n", (IV)IoPAGE(sv)); + Perl_dump_indent(aTHX_ level, file, " PAGE_LEN = %" PERL_PRId64 "\n", (IV)IoPAGE_LEN(sv)); + Perl_dump_indent(aTHX_ level, file, " LINES_LEFT = %" PERL_PRId64 "\n", (IV)IoLINES_LEFT(sv)); +#else Perl_dump_indent(aTHX_ level, file, " IFP = 0x%lx\n", (long)IoIFP(sv)); Perl_dump_indent(aTHX_ level, file, " OFP = 0x%lx\n", (long)IoOFP(sv)); Perl_dump_indent(aTHX_ level, file, " DIRP = 0x%lx\n", (long)IoDIRP(sv)); @@ -1120,6 +1287,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo Perl_dump_indent(aTHX_ level, file, " PAGE = %ld\n", (long)IoPAGE(sv)); Perl_dump_indent(aTHX_ level, file, " PAGE_LEN = %ld\n", (long)IoPAGE_LEN(sv)); Perl_dump_indent(aTHX_ level, file, " LINES_LEFT = %ld\n", (long)IoLINES_LEFT(sv)); +#endif if (IoTOP_NAME(sv)) Perl_dump_indent(aTHX_ level, file, " TOP_NAME = \"%s\"\n", IoTOP_NAME(sv)); do_gv_dump (level, file, " TOP_GV", IoTOP_GV(sv)); @@ -1129,12 +1297,20 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo if (IoBOTTOM_NAME(sv)) Perl_dump_indent(aTHX_ level, file, " BOTTOM_NAME = \"%s\"\n", IoBOTTOM_NAME(sv)); do_gv_dump (level, file, " BOTTOM_GV", IoBOTTOM_GV(sv)); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " SUBPROCESS = %" PERL_PRId64 "\n", (IV)IoSUBPROCESS(sv)); +#else Perl_dump_indent(aTHX_ level, file, " SUBPROCESS = %ld\n", (long)IoSUBPROCESS(sv)); +#endif if (isPRINT(IoTYPE(sv))) Perl_dump_indent(aTHX_ level, file, " TYPE = '%c'\n", IoTYPE(sv)); else Perl_dump_indent(aTHX_ level, file, " TYPE = '\\%o'\n", IoTYPE(sv)); +#ifdef IV_IS_QUAD + Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%" PERL_PRIx64 "\n", (IV)IoFLAGS(sv)); +#else Perl_dump_indent(aTHX_ level, file, " FLAGS = 0x%lx\n", (long)IoFLAGS(sv)); +#endif break; } } |