summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/B/Debug.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/B/Debug.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/B/Debug.pm20
1 files changed, 13 insertions, 7 deletions
diff --git a/Master/tlpkg/tlperl/lib/B/Debug.pm b/Master/tlpkg/tlperl/lib/B/Debug.pm
index 31b0e2834be..c4a1a33afa6 100644
--- a/Master/tlpkg/tlperl/lib/B/Debug.pm
+++ b/Master/tlpkg/tlperl/lib/B/Debug.pm
@@ -1,6 +1,6 @@
package B::Debug;
-our $VERSION = '1.18';
+our $VERSION = '1.19';
use strict;
require 5.006;
@@ -181,7 +181,6 @@ sub B::SV::debug {
printf <<'EOT', class($sv), $$sv, $sv->REFCNT;
%s (0x%x)
REFCNT %d
- FLAGS 0x%x
EOT
printf "\tFLAGS\t\t0x%x", $sv->FLAGS;
if ($have_B_Flags) {
@@ -203,9 +202,10 @@ sub B::PV::debug {
my ($sv) = @_;
$sv->B::SV::debug();
my $pv = $sv->PV();
- printf <<'EOT', cstring($pv), length($pv);
+ printf <<'EOT', cstring($pv), $sv->CUR, $sv->LEN;
xpv_pv %s
xpv_cur %d
+ xpv_len %d
EOT
}
@@ -258,17 +258,23 @@ sub B::CV::debug {
my ($padlist) = $sv->PADLIST;
my ($file) = $sv->FILE;
my ($gv) = $sv->GV;
- printf <<'EOT', $$stash, $$start, $$root, $$gv, $file, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
+ printf <<'EOT', $$stash, $$start, $$root;
STASH 0x%x
START 0x%x
ROOT 0x%x
- GV 0x%x
+EOT
+ if ( $]>5.017 && ($sv->FLAGS & 0x40000)) { #lexsub
+ printf("\tNAME\t%%s\n", $sv->NAME);
+ } else {
+ printf("\tGV\t%0x%x\t%s\n", $$gv, $gv->SAFENAME);
+ }
+ printf <<'EOT', $file, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
FILE %s
DEPTH %d
PADLIST 0x%x
OUTSIDE 0x%x
EOT
- printf("\tOUTSIDE_SEQ\t%d\n", , $sv->OUTSIDE_SEQ) if $] > 5.007;
+ printf("\tOUTSIDE_SEQ\t%d\n", $sv->OUTSIDE_SEQ) if $] > 5.007;
if ($have_B_Flags) {
my $SVt_PVCV = $] < 5.010 ? 12 : 13;
printf("\tCvFLAGS\t0x%x\t%s\n", $sv->CvFLAGS,
@@ -407,7 +413,7 @@ Reini Urban C<rurban@cpan.org>
=head1 LICENSE
Copyright (c) 1996, 1997 Malcolm Beattie
-Copyright (c) 2008, 2010 Reini Urban
+Copyright (c) 2008, 2010, 2013 Reini Urban
This program is free software; you can redistribute it and/or modify
it under the terms of either: