summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-01-03 22:02:49 +0000
committerNicholas Clark <nick@ccl4.org>2007-01-03 22:02:49 +0000
commit0e4c4423f4f1412e4eeb73b8af7f846ea7b0c4bc (patch)
treedc1ed037022d7678659e4cff0416787cff9a5568 /dump.c
parentc773137ed1d1b76e23d5e7a629fe138f442c94e4 (diff)
downloadperl-0e4c4423f4f1412e4eeb73b8af7f846ea7b0c4bc.tar.gz
Teach dump about OURSTASH and COP ranges stored in the NV union.
p4raw-id: //depot/perl@29677
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/dump.c b/dump.c
index 4bdf5c8536..448db919ac 100644
--- a/dump.c
+++ b/dump.c
@@ -1510,9 +1510,14 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
#endif
PerlIO_putc(file, '\n');
}
- if ((type >= SVt_PVNV && type != SVt_PVAV && type != SVt_PVHV
- && type != SVt_PVCV && type != SVt_PVFM && !isGV_with_GP(sv))
- || type == SVt_NV) {
+ if ((type == SVt_PVNV || type == SVt_PVMG) && SvFLAGS(sv) & SVpad_NAME) {
+ Perl_dump_indent(aTHX_ level, file, " COP_LOW = %"UVuf"\n",
+ (UV) COP_SEQ_RANGE_LOW(sv));
+ Perl_dump_indent(aTHX_ level, file, " COP_HIGH = %"UVuf"\n",
+ (UV) COP_SEQ_RANGE_HIGH(sv));
+ } else if ((type >= SVt_PVNV && type != SVt_PVAV && type != SVt_PVHV
+ && type != SVt_PVCV && type != SVt_PVFM && !isGV_with_GP(sv))
+ || type == SVt_NV) {
STORE_NUMERIC_LOCAL_SET_STANDARD();
/* %Vg doesn't work? --jhi */
#ifdef USE_LONG_DOUBLE
@@ -1547,8 +1552,13 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
Perl_dump_indent(aTHX_ level, file, " PV = 0\n");
}
if (type >= SVt_PVMG) {
- if (SvMAGIC(sv))
- do_magic_dump(level, file, SvMAGIC(sv), nest, maxnest, dumpops, pvlim);
+ if (type == SVt_PVMG && SvPAD_OUR(sv)) {
+ if (OURSTASH(sv))
+ do_hv_dump(level, file, " OURSTASH", OURSTASH(sv));
+ } else {
+ if (SvMAGIC(sv))
+ do_magic_dump(level, file, SvMAGIC(sv), nest, maxnest, dumpops, pvlim);
+ }
if (SvSTASH(sv))
do_hv_dump(level, file, " STASH", SvSTASH(sv));
}