},
'B::Debug' => {
- 'DISTRIBUTION' => 'RURBAN/B-Debug-1.21.tar.gz',
+ 'DISTRIBUTION' => 'RURBAN/B-Debug-1.22.tar.gz',
'FILES' => q[cpan/B-Debug],
'EXCLUDED' => ['t/pod.t'],
},
package B::Debug;
-our $VERSION = '1.21';
+our $VERSION = '1.22';
use strict;
require 5.006;
my $op = shift;
my $addr = ${$op} ? $op->ppaddr : '';
$addr =~ s/^PL_ppaddr// if $addr;
- return sprintf "0x%08x %6s %s", ${$op}, ${$op} ? class($op) : '', $addr;
+ if (${$op}) {
+ return sprintf "0x%08x %6s %s", ${$op}, class($op), $addr;
+ } else {
+ return sprintf "0x%x %6s %s", ${$op}, '', $addr;
+ }
}
sub B::OP::debug {
$op->sv->debug;
}
+sub B::METHOP::debug {
+ my ($op) = @_;
+ $op->B::OP::debug();
+ if (${$op->first}) {
+ printf "\top_first\t0x%x\n", ${$op->first};
+ $op->first->debug;
+ } else {
+ printf "\top_meth_sv\t0x%x\n", ${$op->meth_sv};
+ $op->meth_sv->debug;
+ }
+}
+
sub B::PVOP::debug {
my ($op) = @_;
$op->B::OP::debug();
sub compile {
my $order = shift;
B::clearsym();
+ $DB::single = 1 if defined &DB::DB;
if ($order && $order eq "exec") {
return sub { walkoptree_exec(main_start, "debug") }
} else {
=head1 LICENSE
Copyright (c) 1996, 1997 Malcolm Beattie
-Copyright (c) 2008, 2010, 2013 Reini Urban
+Copyright (c) 2008, 2010, 2013, 2014 Reini Urban
This program is free software; you can redistribute it and/or modify
it under the terms of either:
#$b .= " nextstate" if $] < 5.008001; # ??
$b=~s/\n/ /g; $b=~s/\s+/ /g;
$b =~ s/\s+$//;
-is($a, $b);
+
+TODO: {
+ local $TODO = '5.21.5 split optimization' if $] == 5.021005;
+ is($a, $b);
+}
like(B::Debug::_printop(B::main_root), qr/LISTOP\s+\[OP_LEAVE\]/);
like(B::Debug::_printop(B::main_start), qr/OP\s+\[OP_ENTER\]/);