line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- coding: utf-8 -*- |
2
|
|
|
|
|
|
|
# Copyright (C) 2011-2012, 2014 Rocky Bernstein <rocky@cpan.org> |
3
|
12
|
|
|
12
|
|
119
|
use warnings; |
|
12
|
|
|
1
|
|
34
|
|
|
12
|
|
|
|
|
553
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
4
|
12
|
|
|
12
|
|
81
|
use rlib '../../../../..'; |
|
12
|
|
|
1
|
|
39
|
|
|
12
|
|
|
|
|
75
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
4
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Devel::Trepan::CmdProcessor::Command::Info::Return; |
7
|
|
|
|
|
|
|
|
8
|
12
|
|
|
12
|
|
5708
|
use Devel::Trepan::CmdProcessor::Command::Subcmd::Core; |
|
12
|
|
|
1
|
|
35
|
|
|
12
|
|
|
|
|
290
|
|
|
1
|
|
|
|
|
383
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
20
|
|
9
|
|
|
|
|
|
|
|
10
|
12
|
|
|
12
|
|
71
|
use strict; |
|
12
|
|
|
1
|
|
34
|
|
|
12
|
|
|
|
|
304
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
11
|
12
|
|
|
12
|
|
142
|
use vars qw(@ISA @SUBCMD_VARS); |
|
12
|
|
|
1
|
|
35
|
|
|
12
|
|
|
|
|
793
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
12
|
|
|
|
|
|
|
@ISA = qw(Devel::Trepan::CmdProcessor::Command::Subcmd); |
13
|
|
|
|
|
|
|
# Values inherited from parent |
14
|
12
|
|
|
12
|
|
83
|
use vars @Devel::Trepan::CmdProcessor::Command::Subcmd::SUBCMD_VARS; |
|
12
|
|
|
1
|
|
41
|
|
|
12
|
|
|
|
|
1942
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
118
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $SHORT_HELP = "Show the value about to be returned"; |
17
|
|
|
|
|
|
|
=pod |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 Synopsis: |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
our $HELP = <<'HELP'; |
23
|
|
|
|
|
|
|
=pod |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
B<info return> |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Show the value about to be returned. |
28
|
|
|
|
|
|
|
=cut |
29
|
|
|
|
|
|
|
HELP |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
our $MIN_ABBREV = length('ret'); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
unless (@ISA) { |
34
|
|
|
|
|
|
|
eval <<"EOE"; |
35
|
|
|
|
|
|
|
use constant NEED_STACK => 1; |
36
|
|
|
|
|
|
|
EOE |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
12
|
|
|
12
|
|
99
|
use Data::Dumper; |
|
12
|
|
|
1
|
|
46
|
|
|
12
|
|
|
|
|
1044
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
40
|
|
|
|
|
|
|
|
41
|
12
|
|
|
12
|
|
83
|
no warnings 'redefine'; |
|
12
|
|
|
1
|
|
32
|
|
|
12
|
|
|
|
|
832
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
96
|
|
42
|
|
|
|
|
|
|
sub run($$) |
43
|
|
|
|
|
|
|
{ |
44
|
0
|
|
|
0
|
|
|
my ($self, $args) = @_; |
|
0
|
|
|
0
|
|
|
|
45
|
0
|
|
|
|
|
|
my $proc = $self->{proc}; |
|
0
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
12
|
|
|
12
|
|
84
|
no warnings 'once'; |
|
12
|
|
|
1
|
|
36
|
|
|
12
|
|
|
|
|
3515
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
213
|
|
48
|
0
|
0
|
|
|
|
|
unless ($DB::event eq 'return') { |
|
0
|
0
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
$proc->errmsg("We are not stopped at a return"); |
|
0
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
return; |
|
0
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
} |
52
|
0
|
|
|
|
|
|
my $ret_type = $proc->{dbgr}->return_type(); |
|
0
|
|
|
|
|
|
|
53
|
0
|
0
|
|
|
|
|
if ('undef' eq $ret_type) { |
|
0
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
$proc->msg("Return value for $DB::_[0] is <undef>"); |
|
0
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
} elsif ('array' eq $ret_type) { |
56
|
0
|
|
|
|
|
|
$proc->msg("Return array value for $DB::_[0] is:"); |
|
0
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
my @ret = $proc->{dbgr}->return_value(); |
|
0
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
$proc->msg(Dumper(@ret)); |
|
0
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
} elsif ('scalar' eq $ret_type) { |
60
|
0
|
|
0
|
|
|
|
my $ret = $proc->{dbgr}->return_value() || 'undef'; |
|
0
|
|
0
|
|
|
|
|
61
|
0
|
|
|
|
|
|
$proc->msg("Return value for $DB::_[0] is: $ret"); |
|
0
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
unless (caller) { |
66
|
|
|
|
|
|
|
require Devel::Trepan; |
67
|
|
|
|
|
|
|
# Demo it. |
68
|
|
|
|
|
|
|
# require_relative '../../mock' |
69
|
|
|
|
|
|
|
# my($dbgr, $parent_cmd) = MockDebugger::setup('show'); |
70
|
|
|
|
|
|
|
# $cmd = __PACKAGE__->new(parent_cmd); |
71
|
|
|
|
|
|
|
# $cmd->run(@$cmd->prefix); |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
# Suppress a "used-once" warning; |
75
|
|
|
|
|
|
|
$HELP || scalar @SUBCMD_VARS; |