summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2023-01-14 16:20:28 +0000
committerYves Orton <demerphq@gmail.com>2023-02-28 20:53:51 +0800
commit697ec28afb3b2a5eb26f836eaea4cb4071bd71c6 (patch)
tree5e154223ff974ca4634ea223d217e790294d978b
parent10c7b2021d05bc5b69caa39f144a06954fa66d68 (diff)
downloadperl-697ec28afb3b2a5eb26f836eaea4cb4071bd71c6.tar.gz
perl -DsR: display PADMTPs as <P>
The R modifier to the stack debugging switch -Ds already indicates if an SV's refcount is > 1 or SvTEMP is set (T), or the SV is on the temps stack without SvTEMP set (t), e.g.: => IV(101), <2>IV(102), <T>IV(103) <3t>IV(104) With this commit, it displays SVs with the SvPADTMP flag set as <P>, e.g. => <P>IV(101), <2P>IV(102), <PT>IV(103)
-rw-r--r--dump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dump.c b/dump.c
index 8720ea9caf..edbeb182b8 100644
--- a/dump.c
+++ b/dump.c
@@ -536,10 +536,12 @@ Perl_sv_peek(pTHX_ SV *sv)
break;
}
}
- if (is_tmp || SvREFCNT(sv) > 1) {
+ if (is_tmp || SvREFCNT(sv) > 1 || SvPADTMP(sv)) {
Perl_sv_catpvf(aTHX_ t, "<");
if (SvREFCNT(sv) > 1)
Perl_sv_catpvf(aTHX_ t, "%" UVuf, (UV)SvREFCNT(sv));
+ if (SvPADTMP(sv))
+ Perl_sv_catpvf(aTHX_ t, "%s", "P");
if (is_tmp)
Perl_sv_catpvf(aTHX_ t, "%s", SvTEMP(t) ? "T" : "t");
Perl_sv_catpvf(aTHX_ t, ">");