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
|
|
85
|
use warnings; no warnings 'redefine'; no warnings 'once'; |
|
12
|
|
|
12
|
|
39
|
|
|
12
|
|
|
12
|
|
606
|
|
|
12
|
|
|
|
|
87
|
|
|
12
|
|
|
|
|
36
|
|
|
12
|
|
|
|
|
428
|
|
|
12
|
|
|
|
|
75
|
|
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
352
|
|
4
|
12
|
|
|
12
|
|
74
|
use rlib '../../../../../..'; |
|
12
|
|
|
|
|
33
|
|
|
12
|
|
|
|
|
73
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Devel::Trepan::CmdProcessor::Command::Set::Trace::Print; |
7
|
12
|
|
|
12
|
|
5446
|
use Devel::Trepan::CmdProcessor::Command::Subcmd::Subsubcmd; |
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
289
|
|
8
|
|
|
|
|
|
|
|
9
|
12
|
|
|
12
|
|
63
|
use strict; |
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
302
|
|
10
|
12
|
|
|
12
|
|
67
|
use vars qw(@ISA @SUBCMD_VARS); |
|
12
|
|
|
|
|
41
|
|
|
12
|
|
|
|
|
760
|
|
11
|
|
|
|
|
|
|
@ISA = qw(Devel::Trepan::CmdProcessor::Command::SetBoolSubsubcmd); |
12
|
|
|
|
|
|
|
# Values inherited from parent |
13
|
|
|
|
|
|
|
|
14
|
12
|
|
|
12
|
|
126
|
use vars @Devel::Trepan::CmdProcessor::Command::Subsubcmd::SUBCMD_VARS; |
|
12
|
|
|
|
|
37
|
|
|
12
|
|
|
|
|
1717
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $IN_LIST = 1; |
17
|
|
|
|
|
|
|
=pod |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 Synopsis: |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $HELP = <<"HELP"; |
24
|
|
|
|
|
|
|
=pod |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
B<set trace print> [B<on>|B<off>] |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Set printing trace events. This is similar to "set -x" tracing in |
29
|
|
|
|
|
|
|
POSIX shells. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 See also: |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
L<C<show trace print>|Devel::Trepan::CmdProcessor::Show::Trace::Print> |
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
HELP |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
our $MIN_ABBREV = length('p'); |
38
|
12
|
|
|
12
|
|
100
|
use constant MAX_ARGS => 1; |
|
12
|
|
|
|
|
35
|
|
|
12
|
|
|
|
|
2766
|
|
39
|
|
|
|
|
|
|
our $SHORT_HELP = 'Set print trace events, like "set -x" of POSIX shell'; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub run($$) |
42
|
|
|
|
|
|
|
{ |
43
|
0
|
|
|
0
|
|
|
my ($self, $args) = @_; |
44
|
0
|
|
|
|
|
|
$self->SUPER::run($args); |
45
|
0
|
|
|
|
|
|
my $proc = $self->{proc}; |
46
|
0
|
0
|
|
|
|
|
if ( $proc->{settings}{traceprint} ) { |
47
|
0
|
|
|
|
|
|
$proc->{skip_count} = -1; # -1 is like infinite skipping. |
48
|
|
|
|
|
|
|
$proc->{unconditional_prehooks}->insert_if_new(10, |
49
|
|
|
|
|
|
|
$proc->{trace_hook}[0], |
50
|
0
|
|
|
|
|
|
$proc->{trace_hook}[1] |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
} else { |
53
|
0
|
|
|
|
|
|
$proc->{unconditional_prehooks}->delete_by_name('trace'); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
unless (caller) { |
58
|
|
|
|
|
|
|
# Demo it. |
59
|
|
|
|
|
|
|
# require_relative '../../../mock' |
60
|
|
|
|
|
|
|
# name = File.basename(__FILE__, '.rb') |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# dbgr, set_cmd = MockDebugger::setup('set') |
63
|
|
|
|
|
|
|
# max_cmd = Trepan::SubSubcommand::SetMax.new(dbgr.core.processor, |
64
|
|
|
|
|
|
|
# set_cmd) |
65
|
|
|
|
|
|
|
# cmd_ary = Trepan::SubSubcommand::SetMaxList::PREFIX |
66
|
|
|
|
|
|
|
# cmd_name = cmd_ary.join(' ') |
67
|
|
|
|
|
|
|
# subcmd = Trepan::SubSubcommand::SetMaxList.new(set_cmd.proc, |
68
|
|
|
|
|
|
|
# max_cmd, |
69
|
|
|
|
|
|
|
# cmd_name) |
70
|
|
|
|
|
|
|
# prefix_run = cmd_ary[1..-1] |
71
|
|
|
|
|
|
|
# subcmd.run(prefix_run) |
72
|
|
|
|
|
|
|
# subcmd.run(prefix_run + %w(0)) |
73
|
|
|
|
|
|
|
# subcmd.run(prefix_run + %w(20)) |
74
|
|
|
|
|
|
|
# name = File.basename(__FILE__, '.rb') |
75
|
|
|
|
|
|
|
# subcmd.summary_help(name) |
76
|
|
|
|
|
|
|
# puts |
77
|
|
|
|
|
|
|
# puts '-' * 20 |
78
|
|
|
|
|
|
|
# puts subcmd.save_command |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
1; |