line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Enbugger::perl5db; |
2
|
|
|
|
|
|
|
$Enbugger::perl5db::VERSION = '2.016'; |
3
|
|
|
|
|
|
|
# COPYRIGHT AND LICENCE |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Copyright (C) 2007,2008 WhitePages.com, Inc. with primary |
6
|
|
|
|
|
|
|
# development by Joshua ben Jore. |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# This program is distributed WITHOUT ANY WARRANTY, including but not |
9
|
|
|
|
|
|
|
# limited to the implied warranties of merchantability or fitness for |
10
|
|
|
|
|
|
|
# a particular purpose. |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
# The program is free software. You may distribute it and/or modify |
13
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by |
14
|
|
|
|
|
|
|
# the Free Software Foundation (either version 2 or any later version) |
15
|
|
|
|
|
|
|
# and the Perl Artistic License as published by O’Reilly Media, Inc. |
16
|
|
|
|
|
|
|
# Please open the files named gpl-2.0.txt and Artistic for a copy of |
17
|
|
|
|
|
|
|
# these licenses. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Enbugger::perl5db - subclass for the ordinary perl5db.pl debugger |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
|
|
use strict; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
|
|
use vars qw( @ISA @Symbols ); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
|
|
BEGIN { @ISA = 'Enbugger' } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 OVERRIDEN METHODS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=over |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item CLASS-E_load_debugger |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub _load_debugger { |
43
|
0
|
|
|
0
|
|
|
my ( $class ) = @_; |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
$class->_compile_with_nextstate(); |
46
|
0
|
|
|
|
|
|
require 'perl5db.pl'; |
47
|
0
|
|
|
|
|
|
$class->_compile_with_dbstate(); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# FIXME: Why is this fix-up necessary? It's apparently something |
50
|
|
|
|
|
|
|
# funny about how I sometimes choose to set PERLDB_OPTS=noTTY. |
51
|
0
|
50
|
|
|
|
|
$DB::LINEINFO = $DB::OUT if ! defined $DB::LINEINFO; |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
$class->init_debugger; |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
return; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=item CLASS-E_stop |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1 if $DB::signal; |
67
|
|
|
|
|
|
|
sub _stop { |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
# perl5db looks for this to stop. |
70
|
0
|
|
|
0
|
|
|
$DB::signal = 1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
# Use at least the default debug flags. |
73
|
0
|
|
|
|
|
|
$^P |= 0x33f; |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
return; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item CLASS-E_write( TEXT ) |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
1 if $DB::OUT; |
87
|
|
|
|
|
|
|
sub _write { |
88
|
0
|
|
|
0
|
|
|
my $class = shift @_; |
89
|
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
print { $DB::OUT } @_; |
|
0
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
return; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=back |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=cut |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
# Load up a list of symbols known to be associated with this |
107
|
|
|
|
|
|
|
# debugger. Enbugger, the base class will use this to guess at which |
108
|
|
|
|
|
|
|
# debugger has been loaded if it was loaded prior to Enbugger being |
109
|
|
|
|
|
|
|
# around. |
110
|
|
|
|
|
|
|
1 if %Enbugger::RegisteredDebuggers; |
111
|
|
|
|
|
|
|
$Enbugger::RegisteredDebuggers{perl5db}{symbols} = [qw[ |
112
|
|
|
|
|
|
|
ARGS |
113
|
|
|
|
|
|
|
BEGIN |
114
|
|
|
|
|
|
|
CommandSet |
115
|
|
|
|
|
|
|
CreateTTY |
116
|
|
|
|
|
|
|
CvGV_name |
117
|
|
|
|
|
|
|
CvGV_name_or_bust |
118
|
|
|
|
|
|
|
DB |
119
|
|
|
|
|
|
|
DBGR |
120
|
|
|
|
|
|
|
DollarCaretP |
121
|
|
|
|
|
|
|
DollarCaretP_flags |
122
|
|
|
|
|
|
|
DollarCaretP_flags_r |
123
|
|
|
|
|
|
|
END |
124
|
|
|
|
|
|
|
FD_TO_CLOSE |
125
|
|
|
|
|
|
|
IN |
126
|
|
|
|
|
|
|
I_m_init |
127
|
|
|
|
|
|
|
ImmediateStop |
128
|
|
|
|
|
|
|
LINEINFO |
129
|
|
|
|
|
|
|
LineInfo |
130
|
|
|
|
|
|
|
NonStop |
131
|
|
|
|
|
|
|
OUT |
132
|
|
|
|
|
|
|
ReadLine |
133
|
|
|
|
|
|
|
RememberOnROptions |
134
|
|
|
|
|
|
|
RemotePort |
135
|
|
|
|
|
|
|
SAVEIN |
136
|
|
|
|
|
|
|
SAVEOUT |
137
|
|
|
|
|
|
|
Snocheck |
138
|
|
|
|
|
|
|
Spatt |
139
|
|
|
|
|
|
|
Srev |
140
|
|
|
|
|
|
|
TTY |
141
|
|
|
|
|
|
|
VERSION |
142
|
|
|
|
|
|
|
XT |
143
|
|
|
|
|
|
|
a |
144
|
|
|
|
|
|
|
action |
145
|
|
|
|
|
|
|
after |
146
|
|
|
|
|
|
|
afterinit |
147
|
|
|
|
|
|
|
alias |
148
|
|
|
|
|
|
|
arg |
149
|
|
|
|
|
|
|
args |
150
|
|
|
|
|
|
|
arrow |
151
|
|
|
|
|
|
|
b |
152
|
|
|
|
|
|
|
balanced_brace_re |
153
|
|
|
|
|
|
|
break_on_filename_line |
154
|
|
|
|
|
|
|
break_on_filename_line_range |
155
|
|
|
|
|
|
|
break_on_line |
156
|
|
|
|
|
|
|
break_on_load |
157
|
|
|
|
|
|
|
break_subroutine |
158
|
|
|
|
|
|
|
breakable_line |
159
|
|
|
|
|
|
|
breakable_line_in_filename |
160
|
|
|
|
|
|
|
catch |
161
|
|
|
|
|
|
|
clean_ENV |
162
|
|
|
|
|
|
|
cmd |
163
|
|
|
|
|
|
|
cmd_A |
164
|
|
|
|
|
|
|
cmd_B |
165
|
|
|
|
|
|
|
cmd_E |
166
|
|
|
|
|
|
|
cmd_L |
167
|
|
|
|
|
|
|
cmd_M |
168
|
|
|
|
|
|
|
cmd_O |
169
|
|
|
|
|
|
|
cmd_W |
170
|
|
|
|
|
|
|
cmd_a |
171
|
|
|
|
|
|
|
cmd_b |
172
|
|
|
|
|
|
|
cmd_b_line |
173
|
|
|
|
|
|
|
cmd_b_load |
174
|
|
|
|
|
|
|
cmd_b_sub |
175
|
|
|
|
|
|
|
cmd_e |
176
|
|
|
|
|
|
|
cmd_h |
177
|
|
|
|
|
|
|
cmd_i |
178
|
|
|
|
|
|
|
cmd_l |
179
|
|
|
|
|
|
|
cmd_o |
180
|
|
|
|
|
|
|
cmd_pre580_D |
181
|
|
|
|
|
|
|
cmd_pre580_W |
182
|
|
|
|
|
|
|
cmd_pre580_a |
183
|
|
|
|
|
|
|
cmd_pre580_b |
184
|
|
|
|
|
|
|
cmd_pre580_h |
185
|
|
|
|
|
|
|
cmd_pre580_null |
186
|
|
|
|
|
|
|
cmd_pre590_prepost |
187
|
|
|
|
|
|
|
cmd_prepost |
188
|
|
|
|
|
|
|
cmd_stop |
189
|
|
|
|
|
|
|
cmd_v |
190
|
|
|
|
|
|
|
cmd_w |
191
|
|
|
|
|
|
|
cmd_wrapper |
192
|
|
|
|
|
|
|
cmdfhs |
193
|
|
|
|
|
|
|
cond |
194
|
|
|
|
|
|
|
console |
195
|
|
|
|
|
|
|
create_IN_OUT |
196
|
|
|
|
|
|
|
db_complete |
197
|
|
|
|
|
|
|
db_stop |
198
|
|
|
|
|
|
|
dbdie |
199
|
|
|
|
|
|
|
dbline |
200
|
|
|
|
|
|
|
dbwarn |
201
|
|
|
|
|
|
|
deep |
202
|
|
|
|
|
|
|
delete_action |
203
|
|
|
|
|
|
|
delete_breakpoint |
204
|
|
|
|
|
|
|
dieLevel |
205
|
|
|
|
|
|
|
diesignal |
206
|
|
|
|
|
|
|
doccmd |
207
|
|
|
|
|
|
|
doret |
208
|
|
|
|
|
|
|
dump_option |
209
|
|
|
|
|
|
|
dump_trace |
210
|
|
|
|
|
|
|
dumpit |
211
|
|
|
|
|
|
|
emacs |
212
|
|
|
|
|
|
|
end |
213
|
|
|
|
|
|
|
end_report |
214
|
|
|
|
|
|
|
eval |
215
|
|
|
|
|
|
|
evalarg |
216
|
|
|
|
|
|
|
expand_DollarCaretP_flags |
217
|
|
|
|
|
|
|
fake:: |
218
|
|
|
|
|
|
|
fall_off_end |
219
|
|
|
|
|
|
|
file |
220
|
|
|
|
|
|
|
filename |
221
|
|
|
|
|
|
|
filename_error |
222
|
|
|
|
|
|
|
filename_ini |
223
|
|
|
|
|
|
|
find_sub |
224
|
|
|
|
|
|
|
finished |
225
|
|
|
|
|
|
|
fix_less |
226
|
|
|
|
|
|
|
fork_TTY |
227
|
|
|
|
|
|
|
frame |
228
|
|
|
|
|
|
|
get_fork_TTY |
229
|
|
|
|
|
|
|
get_list |
230
|
|
|
|
|
|
|
gets |
231
|
|
|
|
|
|
|
had_breakpoints |
232
|
|
|
|
|
|
|
header |
233
|
|
|
|
|
|
|
help |
234
|
|
|
|
|
|
|
hist |
235
|
|
|
|
|
|
|
histfile |
236
|
|
|
|
|
|
|
histsize |
237
|
|
|
|
|
|
|
i |
238
|
|
|
|
|
|
|
incr |
239
|
|
|
|
|
|
|
incr_pos |
240
|
|
|
|
|
|
|
infix |
241
|
|
|
|
|
|
|
inhibit_exit |
242
|
|
|
|
|
|
|
ini_INC |
243
|
|
|
|
|
|
|
ini_pids |
244
|
|
|
|
|
|
|
ini_warn |
245
|
|
|
|
|
|
|
inpat |
246
|
|
|
|
|
|
|
is_safe_file |
247
|
|
|
|
|
|
|
j |
248
|
|
|
|
|
|
|
l |
249
|
|
|
|
|
|
|
laststep |
250
|
|
|
|
|
|
|
level |
251
|
|
|
|
|
|
|
line |
252
|
|
|
|
|
|
|
lineinfo |
253
|
|
|
|
|
|
|
list_modules |
254
|
|
|
|
|
|
|
load_hist |
255
|
|
|
|
|
|
|
lock |
256
|
|
|
|
|
|
|
macosx_get_fork_TTY |
257
|
|
|
|
|
|
|
max |
258
|
|
|
|
|
|
|
maxtrace |
259
|
|
|
|
|
|
|
methods |
260
|
|
|
|
|
|
|
methods_via |
261
|
|
|
|
|
|
|
noTTY |
262
|
|
|
|
|
|
|
notty |
263
|
|
|
|
|
|
|
od |
264
|
|
|
|
|
|
|
old_watch |
265
|
|
|
|
|
|
|
onetimeDump |
266
|
|
|
|
|
|
|
onetimedumpDepth |
267
|
|
|
|
|
|
|
option |
268
|
|
|
|
|
|
|
optionAction |
269
|
|
|
|
|
|
|
optionRequire |
270
|
|
|
|
|
|
|
optionVars |
271
|
|
|
|
|
|
|
option_val |
272
|
|
|
|
|
|
|
options |
273
|
|
|
|
|
|
|
options2remember |
274
|
|
|
|
|
|
|
ornaments |
275
|
|
|
|
|
|
|
os2_get_fork_TTY |
276
|
|
|
|
|
|
|
osingle |
277
|
|
|
|
|
|
|
otrace |
278
|
|
|
|
|
|
|
package |
279
|
|
|
|
|
|
|
packname |
280
|
|
|
|
|
|
|
pager |
281
|
|
|
|
|
|
|
panic |
282
|
|
|
|
|
|
|
parse_DollarCaretP_flags |
283
|
|
|
|
|
|
|
parse_options |
284
|
|
|
|
|
|
|
pat |
285
|
|
|
|
|
|
|
pidprompt |
286
|
|
|
|
|
|
|
pids |
287
|
|
|
|
|
|
|
pieces |
288
|
|
|
|
|
|
|
piped |
289
|
|
|
|
|
|
|
position |
290
|
|
|
|
|
|
|
post |
291
|
|
|
|
|
|
|
postponed |
292
|
|
|
|
|
|
|
postponed_file |
293
|
|
|
|
|
|
|
postponed_sub |
294
|
|
|
|
|
|
|
prc |
295
|
|
|
|
|
|
|
pre |
296
|
|
|
|
|
|
|
pre580_help |
297
|
|
|
|
|
|
|
pre580_summary |
298
|
|
|
|
|
|
|
prefix |
299
|
|
|
|
|
|
|
pretype |
300
|
|
|
|
|
|
|
prevbus |
301
|
|
|
|
|
|
|
prevdie |
302
|
|
|
|
|
|
|
preview |
303
|
|
|
|
|
|
|
prevsegv |
304
|
|
|
|
|
|
|
prevwarn |
305
|
|
|
|
|
|
|
print_help |
306
|
|
|
|
|
|
|
print_lineinfo |
307
|
|
|
|
|
|
|
print_trace |
308
|
|
|
|
|
|
|
psh |
309
|
|
|
|
|
|
|
rc |
310
|
|
|
|
|
|
|
rcfile |
311
|
|
|
|
|
|
|
readline |
312
|
|
|
|
|
|
|
recallCommand |
313
|
|
|
|
|
|
|
remoteport |
314
|
|
|
|
|
|
|
report_break_on_load |
315
|
|
|
|
|
|
|
rerun |
316
|
|
|
|
|
|
|
res |
317
|
|
|
|
|
|
|
reset_IN_OUT |
318
|
|
|
|
|
|
|
resetterm |
319
|
|
|
|
|
|
|
restart |
320
|
|
|
|
|
|
|
rl |
321
|
|
|
|
|
|
|
rl_attribs |
322
|
|
|
|
|
|
|
runman |
323
|
|
|
|
|
|
|
runnonstop |
324
|
|
|
|
|
|
|
safe_do |
325
|
|
|
|
|
|
|
save |
326
|
|
|
|
|
|
|
save_hist |
327
|
|
|
|
|
|
|
saved |
328
|
|
|
|
|
|
|
savout |
329
|
|
|
|
|
|
|
second_time |
330
|
|
|
|
|
|
|
seen |
331
|
|
|
|
|
|
|
selected |
332
|
|
|
|
|
|
|
set_list |
333
|
|
|
|
|
|
|
sethelp |
334
|
|
|
|
|
|
|
setman |
335
|
|
|
|
|
|
|
setterm |
336
|
|
|
|
|
|
|
sh |
337
|
|
|
|
|
|
|
share |
338
|
|
|
|
|
|
|
shellBang |
339
|
|
|
|
|
|
|
signal |
340
|
|
|
|
|
|
|
signalLevel |
341
|
|
|
|
|
|
|
single |
342
|
|
|
|
|
|
|
skipCvGV |
343
|
|
|
|
|
|
|
slave_editor |
344
|
|
|
|
|
|
|
stack |
345
|
|
|
|
|
|
|
stack_depth |
346
|
|
|
|
|
|
|
start |
347
|
|
|
|
|
|
|
stop |
348
|
|
|
|
|
|
|
stuff |
349
|
|
|
|
|
|
|
sub |
350
|
|
|
|
|
|
|
subname |
351
|
|
|
|
|
|
|
subrange |
352
|
|
|
|
|
|
|
subroutine_filename_lines |
353
|
|
|
|
|
|
|
summary |
354
|
|
|
|
|
|
|
system |
355
|
|
|
|
|
|
|
term |
356
|
|
|
|
|
|
|
term_pid |
357
|
|
|
|
|
|
|
tkRunning |
358
|
|
|
|
|
|
|
to_watch |
359
|
|
|
|
|
|
|
trace |
360
|
|
|
|
|
|
|
truehist |
361
|
|
|
|
|
|
|
try |
362
|
|
|
|
|
|
|
tty |
363
|
|
|
|
|
|
|
typeahead |
364
|
|
|
|
|
|
|
unbalanced |
365
|
|
|
|
|
|
|
usercontext |
366
|
|
|
|
|
|
|
vars |
367
|
|
|
|
|
|
|
warn |
368
|
|
|
|
|
|
|
warnLevel |
369
|
|
|
|
|
|
|
watchfunction |
370
|
|
|
|
|
|
|
window |
371
|
|
|
|
|
|
|
xterm_get_fork_TTY |
372
|
|
|
|
|
|
|
]]; |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
## Local Variables: |
375
|
|
|
|
|
|
|
## mode: cperl |
376
|
|
|
|
|
|
|
## mode: auto-fill |
377
|
|
|
|
|
|
|
## cperl-indent-level: 4 |
378
|
|
|
|
|
|
|
## End: |