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
|
|
91
|
use warnings; no warnings 'redefine'; no warnings 'once'; |
|
12
|
|
|
12
|
|
35
|
|
|
12
|
|
|
12
|
|
524
|
|
|
12
|
|
|
|
|
73
|
|
|
12
|
|
|
|
|
32
|
|
|
12
|
|
|
|
|
417
|
|
|
12
|
|
|
|
|
77
|
|
|
12
|
|
|
|
|
33
|
|
|
12
|
|
|
|
|
376
|
|
4
|
12
|
|
|
12
|
|
73
|
use rlib '../../../../../..'; |
|
12
|
|
|
|
|
40
|
|
|
12
|
|
|
|
|
74
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Devel::Trepan::CmdProcessor::Command::Set::Max::Stack; |
7
|
12
|
|
|
12
|
|
5164
|
use Devel::Trepan::CmdProcessor::Command::Subcmd::Subsubcmd; |
|
12
|
|
|
|
|
33
|
|
|
12
|
|
|
|
|
322
|
|
8
|
|
|
|
|
|
|
|
9
|
12
|
|
|
12
|
|
77
|
use strict; |
|
12
|
|
|
|
|
30
|
|
|
12
|
|
|
|
|
326
|
|
10
|
12
|
|
|
12
|
|
62
|
use vars qw(@ISA @SUBCMD_VARS); |
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
779
|
|
11
|
|
|
|
|
|
|
@ISA = qw(Devel::Trepan::CmdProcessor::Command::Subsubcmd); |
12
|
|
|
|
|
|
|
# Values inherited from parent |
13
|
|
|
|
|
|
|
|
14
|
12
|
|
|
12
|
|
76
|
use vars @Devel::Trepan::CmdProcessor::Command::Subsubcmd::SUBCMD_VARS; |
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
2781
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $IN_LIST = 1; |
17
|
|
|
|
|
|
|
=pod |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 Synopsis: |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
our $HELP = <<"HELP"; |
23
|
|
|
|
|
|
|
=pod |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
B<set max stack> I<number> |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Set number of source-code lines to list by default."; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 See also: |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
L<C<show max stack>|Devel::Trepan::CmdProcessor::Show::Max::Strack> |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
HELP |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
our $MIN_ABBREV = length('lis'); |
37
|
|
|
|
|
|
|
our $SHORT_HELP = 'Set number of lines to list'; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub run($$) |
40
|
|
|
|
|
|
|
{ |
41
|
0
|
|
|
0
|
|
|
my ($self, $args) = @_; |
42
|
0
|
|
|
|
|
|
my @args = @$args; |
43
|
0
|
|
|
|
|
|
shift @args; shift @args; shift @args; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
my $num_str = join(' ', @args); |
45
|
0
|
|
|
|
|
|
$self->run_set_int($num_str, |
46
|
|
|
|
|
|
|
"The '$self->{cmd_str}' command requires a line width", |
47
|
|
|
|
|
|
|
0); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
unless (caller) { |
51
|
|
|
|
|
|
|
# Demo it. |
52
|
|
|
|
|
|
|
# require_relative '../../../mock' |
53
|
|
|
|
|
|
|
# name = File.basename(__FILE__, '.rb') |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# dbgr, set_cmd = MockDebugger::setup('set') |
56
|
|
|
|
|
|
|
# max_cmd = Trepan::SubSubcommand::SetMax.new(dbgr.core.processor, |
57
|
|
|
|
|
|
|
# set_cmd) |
58
|
|
|
|
|
|
|
# cmd_ary = Trepan::SubSubcommand::SetMaxStack::PREFIX |
59
|
|
|
|
|
|
|
# cmd_name = cmd_ary.join(' ') |
60
|
|
|
|
|
|
|
# subcmd = Trepan::SubSubcommand::SetMaxStacka.new(set_cmd.proc, |
61
|
|
|
|
|
|
|
# max_cmd, |
62
|
|
|
|
|
|
|
# cmd_name) |
63
|
|
|
|
|
|
|
# prefix_run = cmd_ary[1..-1] |
64
|
|
|
|
|
|
|
# subcmd.run(prefix_run) |
65
|
|
|
|
|
|
|
# subcmd.run(prefix_run + %w(0)) |
66
|
|
|
|
|
|
|
# subcmd.run(prefix_run + %w(20)) |
67
|
|
|
|
|
|
|
# name = File.basename(__FILE__, '.rb') |
68
|
|
|
|
|
|
|
# subcmd.summary_help(name) |
69
|
|
|
|
|
|
|
# puts |
70
|
|
|
|
|
|
|
# puts '-' * 20 |
71
|
|
|
|
|
|
|
# puts subcmd.save_command |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
1; |