summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2005-03-28 21:38:44 +0000
committerDave Mitchell <davem@fdisolutions.com>2005-03-28 21:38:44 +0000
commitfd0854ffd71f437c5e7d44b6f60361faf0bd6d15 (patch)
tree35b2cad6f2cc4e9a78429f91fc6dbed9b69c1f95 /perl.c
parent1af60bcb794810018aa77e3f4c7d128153067785 (diff)
downloadperl-fd0854ffd71f437c5e7d44b6f60361faf0bd6d15.tar.gz
expand -DDEBUG_LEAKING_SCALARS to instrument the creation of each SV
p4raw-id: //depot/perl@24088
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 9d3ecf4ca7..118c1f498d 100644
--- a/perl.c
+++ b/perl.c
@@ -827,8 +827,16 @@ perl_destruct(pTHXx)
if (SvTYPE(sv) != SVTYPEMASK) {
PerlIO_printf(Perl_debug_log, "leaked: sv=0x%p"
" flags=0x08%"UVxf
- " refcnt=%"UVuf pTHX__FORMAT "\n",
- sv, sv->sv_flags, sv->sv_refcnt pTHX__VALUE);
+ " refcnt=%"UVuf pTHX__FORMAT "\n"
+ "\tallocated at %s:%d %s %s%s\n",
+ sv, sv->sv_flags, sv->sv_refcnt pTHX__VALUE,
+ sv->sv_debug_file ? sv->sv_debug_file : "(unknown)",
+ sv->sv_debug_line,
+ sv->sv_debug_inpad ? "for" : "by",
+ sv->sv_debug_optype ?
+ PL_op_name[sv->sv_debug_optype]: "(none)",
+ sv->sv_debug_cloned ? " (cloned)" : ""
+ );
}
}
}