diff options
author | David Mitchell <davem@iabyn.com> | 2023-01-14 16:20:28 +0000 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-02-28 20:53:51 +0800 |
commit | 697ec28afb3b2a5eb26f836eaea4cb4071bd71c6 (patch) | |
tree | 5e154223ff974ca4634ea223d217e790294d978b | |
parent | 10c7b2021d05bc5b69caa39f144a06954fa66d68 (diff) | |
download | perl-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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, ">"); |