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
|
|
96
|
use warnings; no warnings 'redefine'; |
|
12
|
|
|
12
|
|
27
|
|
|
12
|
|
|
1
|
|
372
|
|
|
12
|
|
|
1
|
|
62
|
|
|
12
|
|
|
|
|
18
|
|
|
12
|
|
|
|
|
363
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
4
|
|
|
|
|
|
|
|
5
|
12
|
|
|
12
|
|
59
|
use rlib '../../../..'; |
|
12
|
|
|
1
|
|
26
|
|
|
12
|
|
|
|
|
65
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# require_relative '../../app/condition' |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Devel::Trepan::CmdProcessor::Command::Next; |
10
|
|
|
|
|
|
|
|
11
|
12
|
|
|
12
|
|
4455
|
use if !@ISA, Devel::Trepan::CmdProcessor::Command ; |
|
12
|
|
|
1
|
|
25
|
|
|
12
|
|
|
|
|
62
|
|
|
1
|
|
|
|
|
346
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
unless (@ISA) { |
14
|
12
|
|
|
12
|
|
75
|
eval <<'EOE'; |
|
12
|
|
|
12
|
|
24
|
|
|
12
|
|
|
12
|
|
840
|
|
|
12
|
|
|
12
|
|
71
|
|
|
12
|
|
|
12
|
|
24
|
|
|
12
|
|
|
12
|
|
505
|
|
|
12
|
|
|
|
|
61
|
|
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
449
|
|
|
12
|
|
|
|
|
61
|
|
|
12
|
|
|
|
|
29
|
|
|
12
|
|
|
|
|
463
|
|
|
12
|
|
|
|
|
62
|
|
|
12
|
|
|
|
|
24
|
|
|
12
|
|
|
|
|
461
|
|
|
12
|
|
|
|
|
79
|
|
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
436
|
|
15
|
|
|
|
|
|
|
use constant ALIASES => qw(n next+ next- n+ n-); |
16
|
|
|
|
|
|
|
use constant CATEGORY => 'running'; |
17
|
|
|
|
|
|
|
use constant SHORT_HELP => 'Step program without entering called functions'; |
18
|
|
|
|
|
|
|
use constant MIN_ARGS => 0; # Need at least this many |
19
|
|
|
|
|
|
|
use constant MAX_ARGS => 1; # Need at most this many - |
20
|
|
|
|
|
|
|
# undef -> unlimited. |
21
|
|
|
|
|
|
|
use constant NEED_STACK => 1; |
22
|
|
|
|
|
|
|
EOE |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
12
|
|
|
12
|
|
1834
|
use strict; |
|
12
|
|
|
1
|
|
26
|
|
|
12
|
|
|
|
|
275
|
|
|
1
|
|
|
|
|
57
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
26
|
12
|
|
|
12
|
|
53
|
use vars qw(@ISA); @ISA = @CMD_ISA; |
|
12
|
|
|
1
|
|
27
|
|
|
12
|
|
|
|
|
512
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
27
|
12
|
|
|
12
|
|
66
|
use vars @CMD_VARS; # Value inherited from parent |
|
12
|
|
|
1
|
|
26
|
|
|
12
|
|
|
|
|
2169
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
189
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
our $NAME = set_name(); |
30
|
|
|
|
|
|
|
=pod |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 Synopsis: |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
our $HELP = <<'HELP'; |
36
|
|
|
|
|
|
|
=pod |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
B<next>[B<+>|B<->] [I<count>] |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Step one statement ignoring steps into function calls at this level. |
41
|
|
|
|
|
|
|
Sometimes this is called 'step over'. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
With an integer argument, perform 'next' that many times. However if |
44
|
|
|
|
|
|
|
an exception occurs at this level, or we 'return' or 'yield' or the |
45
|
|
|
|
|
|
|
thread changes, we stop regardless of count. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
A suffix of C<+> on the command or an alias to the command forces to |
48
|
|
|
|
|
|
|
move to another line, while a suffix of C<-> does the opposite and |
49
|
|
|
|
|
|
|
disables the requiring a move to a new line. If no suffix is given, |
50
|
|
|
|
|
|
|
the debugger setting 'different' determines this behavior. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
If no suffix is given, the debugger setting 'different' |
53
|
|
|
|
|
|
|
determines this behavior. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 Example: |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
next |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 See also: |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L<C<step> (step into)|Devel::Trepan::CmdProcessor::Command::Step>, |
62
|
|
|
|
|
|
|
L<C<finish> (step out)|Devel::Trepan::CmdProcessor::Command::Finish>, |
63
|
|
|
|
|
|
|
L<C<continue>|Devel::Trepan::CmdProcessor::Command::Continue> |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
HELP |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
# This method runs the command |
69
|
|
|
|
|
|
|
sub run($$) { |
70
|
0
|
|
|
0
|
0
|
|
my ($self, $args) = @_; |
|
0
|
|
|
0
|
0
|
|
|
71
|
0
|
|
|
|
|
|
my $proc = $self->{proc}; |
|
0
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
my $opts = $proc->parse_next_step_suffix($args->[0]); |
|
0
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
# FIXME: parse and adjust step count |
75
|
0
|
|
|
|
|
|
$proc->{skip_count} = 0; |
|
0
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
0
|
|
|
|
|
|
$proc->next($opts); |
|
0
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
unless (caller) { |
81
|
|
|
|
|
|
|
# require_relative '../mock' |
82
|
|
|
|
|
|
|
# dbgr, cmd = MockDebugger::setup |
83
|
|
|
|
|
|
|
# p cmd.run([cmd.name]) |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
1; |