package B::Debug;
-our $VERSION = '1.18';
+our $VERSION = '1.19';
use strict;
require 5.006;
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) {
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
}
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,
=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: