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
|
|
108
|
use warnings; no warnings 'redefine'; |
|
12
|
|
|
12
|
|
33
|
|
|
12
|
|
|
1
|
|
538
|
|
|
12
|
|
|
1
|
|
72
|
|
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
402
|
|
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
45
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
61
|
|
4
|
|
|
|
|
|
|
|
5
|
12
|
|
|
12
|
|
64
|
use rlib '../../../..'; |
|
12
|
|
|
1
|
|
35
|
|
|
12
|
|
|
|
|
78
|
|
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
6
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Devel::Trepan::CmdProcessor::Command::TBreak; |
8
|
|
|
|
|
|
|
|
9
|
12
|
|
|
12
|
|
4357
|
use if !@ISA, Devel::Trepan::CmdProcessor::Command ; |
|
12
|
|
|
1
|
|
31
|
|
|
12
|
|
|
|
|
84
|
|
|
1
|
|
|
|
|
539
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
6
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
unless (@ISA) { |
12
|
12
|
|
|
12
|
|
80
|
eval <<'EOE'; |
|
12
|
|
|
12
|
|
39
|
|
|
12
|
|
|
12
|
|
707
|
|
|
12
|
|
|
12
|
|
81
|
|
|
12
|
|
|
12
|
|
45
|
|
|
12
|
|
|
|
|
549
|
|
|
12
|
|
|
|
|
85
|
|
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
604
|
|
|
12
|
|
|
|
|
74
|
|
|
12
|
|
|
|
|
37
|
|
|
12
|
|
|
|
|
576
|
|
|
12
|
|
|
|
|
77
|
|
|
12
|
|
|
|
|
32
|
|
|
12
|
|
|
|
|
578
|
|
13
|
|
|
|
|
|
|
use constant CATEGORY => 'breakpoints'; |
14
|
|
|
|
|
|
|
use constant SHORT_HELP => 'Set a one-time breakpoint'; |
15
|
|
|
|
|
|
|
use constant MIN_ARGS => 0; # Need at least this many |
16
|
|
|
|
|
|
|
use constant MAX_ARGS => undef; # Need at most this many - undef -> unlimited. |
17
|
|
|
|
|
|
|
use constant NEED_STACK => 1; |
18
|
|
|
|
|
|
|
EOE |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
12
|
|
|
12
|
|
2190
|
use strict; |
|
12
|
|
|
1
|
|
37
|
|
|
12
|
|
|
|
|
366
|
|
|
1
|
|
|
|
|
100
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
22
|
12
|
|
|
12
|
|
82
|
use vars qw(@ISA); @ISA = @CMD_ISA; |
|
12
|
|
|
1
|
|
34
|
|
|
12
|
|
|
|
|
725
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
58
|
|
23
|
12
|
|
|
12
|
|
79
|
use vars @CMD_VARS; # Value inherited from parent |
|
12
|
|
|
1
|
|
34
|
|
|
12
|
|
|
|
|
1517
|
|
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
107
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our $NAME = set_name(); |
26
|
|
|
|
|
|
|
=pod |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 Synopsis: |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
our $HELP = <<'HELP'; |
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
B<tbreak> [I<location>] |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Set a one-time breakpoint. The breakpoint is removed after it is hit. |
37
|
|
|
|
|
|
|
If no location is given use the current stopping point. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 Examples: |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
tbreak |
42
|
|
|
|
|
|
|
tbreak 10 # set breakpoint on line 10 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
When a breakpoint is hit the event icon is C<x1>. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 See also: |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
L<C<break>|Devel::Trepan::CmdProcessor::Break> and |
49
|
|
|
|
|
|
|
C<help breakpoints>. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |
52
|
|
|
|
|
|
|
HELP |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# This method runs the command |
55
|
|
|
|
|
|
|
sub run($$) { |
56
|
0
|
|
|
0
|
0
|
|
my ($self, $args) = @_; |
|
0
|
|
|
0
|
0
|
|
|
57
|
12
|
|
|
12
|
|
84
|
no warnings 'once'; |
|
12
|
|
|
1
|
|
38
|
|
|
12
|
|
|
|
|
1069
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
82
|
|
58
|
0
|
|
|
|
|
|
$self->{dbgr}->set_tbreak($DB::filename, $args->[1]); |
|
0
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
unless (caller) { |
62
|
|
|
|
|
|
|
# require_relative '../mock' |
63
|
|
|
|
|
|
|
# dbgr, cmd = MockDebugger::setup |
64
|
|
|
|
|
|
|
# p cmd.run([cmd.name]) |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |