perldebug > 5.26.1 との差分

perldebug 5.26.1 と 5.12.1 の差分

11
22=encoding euc-jp
33
44=head1 NAME
55X<debug> X<debugger>
66
77=begin original
88
99perldebug - Perl debugging
1010
1111=end original
1212
1313perldebug - Perl のデバッグ
1414
1515=head1 DESCRIPTION
1616
1717=begin original
1818
19First of all, have you tried using L<C<use strict;>|strict> and
19First of all, have you tried using the B<-w> switch?
20L<C<use warnings;>|warnings>?
2120
2221=end original
2322
24まず最初にもう L<C<use strict;>|strict> と L<C<use warnings;>|warnings>
23まず最初に一言「もう B<-w> スイッチお使いになりましたか。」
25使ってみましたか?
2624
2725=begin original
2826
2927If you're new to the Perl debugger, you may prefer to read
30L<perldebtut>, which is a tutorial introduction to the debugger.
28L<perldebtut>, which is a tutorial introduction to the debugger .
3129
3230=end original
3331
3432もし Perl デバッガに慣れていないなら、デバッガに関するチュートリアルである
3533L<perldebtut> を読んだ方がいいかもしれません。
3634
3735=head1 The Perl Debugger
3836
3937=begin original
4038
4139If you invoke Perl with the B<-d> switch, your script runs under the
4240Perl source debugger. This works like an interactive Perl
4341environment, prompting for debugger commands that let you examine
4442source code, set breakpoints, get stack backtraces, change the values of
4543variables, etc. This is so convenient that you often fire up
4644the debugger all by itself just to test out Perl constructs
4745interactively to see what they do. For example:
4846X<-d>
4947
5048=end original
5149
5250Perl を B<-d> スイッチを付けて起動すれば、スクリプトは Perl ソースデバッガ
5351上で実行されることになります。
5452これは対話的な Perl 環境のように動作し、
5553ソースコードの表示、ブレークポイントの設定、スタックのバックトレース、
5654変数の値の変更、などを実行するデバッガコマンドを入力できます。
5755これはとても便利なので、単にやりたいことを対話的に試すために
5856デバッガを起動するようになるでしょう。
5957例えば:
6058X<-d>
6159
6260 $ perl -d -e 42
6361
6462=begin original
6563
6664In Perl, the debugger is not a separate program the way it usually is in the
6765typical compiled environment. Instead, the B<-d> flag tells the compiler
6866to insert source information into the parse trees it's about to hand off
6967to the interpreter. That means your code must first compile correctly
7068for the debugger to work on it. Then when the interpreter starts up, it
7169preloads a special Perl library file containing the debugger.
7270
7371=end original
7472
7573しかし、Perl デバッガは典型的なコンパイルされた環境の様に独立した
7674プログラムではありません。 その代わりに、
7775-d フラグによって、コンパイラがインタプリタに渡すパース木にソース情報を
7876埋め込むようにしています。これは、ソースがデバッガ上で動作できるためには、
7977一度正常にコンパイルできないといけないということです。
8078それからインタプリタが起動され、デバッガを含む
8179特別な Perl ライブラリをロードします。
8280
8381=begin original
8482
8583The program will halt I<right before> the first run-time executable
8684statement (but see below regarding compile-time statements) and ask you
8785to enter a debugger command. Contrary to popular expectations, whenever
8886the debugger halts and shows you a line of code, it always displays the
8987line it's I<about> to execute, rather than the one it has just executed.
9088
9189=end original
9290
9391プログラムは、最初の実行時実行文のI<直前>で停止し
9492(ただし、以下コンパイル時実行文については後述します)、以下に示すいずれかの
9593コマンドが入力されるのを待ちます。
9694よくある期待とは逆に、
9795デバッガが停止してある行のコードを表示しているときは、
9896直前に実行した行ではなく、常にI<今から実行する>行を表示します。
9997
10098=begin original
10199
102100Any command not recognized by the debugger is directly executed
103101(C<eval>'d) as Perl code in the current package. (The debugger
104102uses the DB package for keeping its own state information.)
105103
106104=end original
107105
108106デバッガが認識できないコマンドは現在のパッケージ内で Perl のコードとして
109107実行(C<eval>)されます。
110108(デバッガは自分自身の状態を保存するために DB パッケージを使います。)
111109
112110=begin original
113111
114112Note that the said C<eval> is bound by an implicit scope. As a
115113result any newly introduced lexical variable or any modified
116114capture buffer content is lost after the eval. The debugger is a
117115nice environment to learn Perl, but if you interactively experiment using
118116material which should be in the same scope, stuff it in one line.
119117
120118=end original
121119
122120C<eval> は暗黙のスコープで区切られていることに注意してください。
123121結果として、新しく導入されたレキシカル変数や変更された捕捉バッファの内容は
124122eval の後失われます。
125123デバッガは Perl を学ぶよい環境ですが、もし同じスコープ内であるべき
126124ものを使って対話的に実験したい場合は、それを 1 行に書いてください。
127125
128126=begin original
129127
130128For any text entered at the debugger prompt, leading and trailing whitespace
131129is first stripped before further processing. If a debugger command
132130coincides with some function in your own program, merely precede the
133131function with something that doesn't look like a debugger command, such
134132as a leading C<;> or perhaps a C<+>, or by wrapping it with parentheses
135133or braces.
136134
137135=end original
138136
139137デバッガコマンドとして入力された文字列は、まず先頭と末尾の
140138空白が切り詰められます。
141139デバッガコマンドがプログラムの関数名と一致する場合、
142140関数名の前に C<;> や C<+> のような、デバッガコマンドに見えない文字を
143141付け加えるか、括弧でくくってください。
144142
145=head2 Calling the Debugger
143=head2 Calling the debugger
146144
147145(デバッガを呼び出す)
148146
149147=begin original
150148
151149There are several ways to call the debugger:
152150
153151=end original
154152
155153デバッガを呼び出すにはいくつかの方法があります:
156154
157155=over 4
158156
159157=item perl -d program_name
160158
161159=begin original
162160
163161On the given program identified by C<program_name>.
164162
165163=end original
166164
167165C<program_name> で識別されるプログラムに対して。
168166
169167=item perl -d -e 0
170168
171169=begin original
172170
173171Interactively supply an arbitrary C<expression> using C<-e>.
174172
175173=end original
176174
177175C<-e> を使って指定された任意の C<expression> を対話的に。
178176
179=item perl -d:ptkdb program_name
177=item perl -d:Ptkdb program_name
180178
181179=begin original
182180
183Debug a given program via the C<Devel::ptkdb> GUI.
181Debug a given program via the C<Devel::Ptkdb> GUI.
184182
185183=end original
186184
187185C<Devel::Ptkdb> GUI 経由で与えられたプログラムをデバッグする。
188186
189187=item perl -dt threaded_program_name
190188
191189=begin original
192190
193191Debug a given program using threads (experimental).
194192
195193=end original
196194
197195スレッドを使っているプログラムをデバッグする(実験的機能)。
198196
199197=back
200198
201199=head2 Debugger Commands
202200
203201(デバッガコマンド)
204202
205203=begin original
206204
207205The interactive debugger understands the following commands:
208206
209207=end original
210208
211209対話式のデバッガは以下のコマンドを理解します:
212210
213211=over 12
214212
215213=item h
216214X<debugger command, h>
217215
218216=begin original
219217
220218Prints out a summary help message
221219
222220=end original
223221
224222サマリヘルプメッセージを表示します。
225223
226224=item h [command]
227225
228226=begin original
229227
230228Prints out a help message for the given debugger command.
231229
232230=end original
233231
234232指定されたコマンドの説明を表示します。
235233
236234=item h h
237235
238236=begin original
239237
240238The special argument of C<h h> produces the entire help page, which is quite long.
241239
242240=end original
243241
244242C<h h> という特別なコマンドは、かなり長い、ヘルプ全体を表示します。
245243
246244=begin original
247245
248246If the output of the C<h h> command (or any command, for that matter) scrolls
249247past your screen, precede the command with a leading pipe symbol so
250248that it's run through your pager, as in
251249
252250=end original
253251
254252C<h h> コマンド(や他のコマンドでも)の出力で画面がスクロールしてしまう場合、
255253以下のようにコマンドの前にパイプ記号をつけるとページャーを呼び出します:
256254
257255 DB> |h h
258256
259257=begin original
260258
261259You may change the pager which is used via C<o pager=...> command.
262260
263261=end original
264262
265263使用されるページャーは C<O pager=...> コマンドで変更できます。
266264
267265=item p expr
268266X<debugger command, p>
269267
270268=begin original
271269
272270Same as C<print {$DB::OUT} expr> in the current package. In particular,
273271because this is just Perl's own C<print> function, this means that nested
274272data structures and objects are not dumped, unlike with the C<x> command.
275273
276274=end original
277275
278276現在のパッケージでの C<print {$DB::OUT} expr> と同じです。
279277特に、これは Perl 自身の C<print> 関数なので、
280278C<x> コマンドと違って、ネストしたデータ構造やオブジェクトはダンプしません。
281279
282280=begin original
283281
284282The C<DB::OUT> filehandle is opened to F</dev/tty>, regardless of
285283where STDOUT may be redirected to.
286284
287285=end original
288286
289287STDOUT がどこにリダイレクトされていても、
290288ファイルハンドル C<DB::OUT> は F</dev/tty> に対して
291289オープンされています。
292290
293291=item x [maxdepth] expr
294292X<debugger command, x>
295293
296294=begin original
297295
298296Evaluates its expression in list context and dumps out the result in a
299297pretty-printed fashion. Nested data structures are printed out
300298recursively, unlike the real C<print> function in Perl. When dumping
301299hashes, you'll probably prefer 'x \%h' rather than 'x %h'.
302300See L<Dumpvalue> if you'd like to do this yourself.
303301
304302=end original
305303
306304式をリストコンテキストで評価し、結果を多少読みやすい形で表示します。
307ネストしたデータは再帰的に表示します; これは Perl の実際の C<print> 関数とは
305ネストしたデータは再帰的に表示します
308異なります。
306これは Perl の実際の C<print> 関数とは異なります。
309ハッシュをダンプするとき、おそらく 'x %h' より 'x \%h' を好むでしょう。
307When dumping
308hashes, you'll probably prefer 'x \%h' rather than 'x %h'.
310309これを自分自身で行いたい場合は L<Dumpvalue> を参照して下さい。
311310
312311=begin original
313312
314313The output format is governed by multiple options described under
315L</"Configurable Options">.
314L<"Configurable Options">.
316315
317316=end original
318317
319出力フォーマットは L<"/Configurable Options"> に記された
318出力フォーマットは L<"Configurable Options"> に記された
320319様々なオプションの影響を受けます。
321320
322321=begin original
323322
324323If the C<maxdepth> is included, it must be a numeral I<N>; the value is
325324dumped only I<N> levels deep, as if the C<dumpDepth> option had been
326325temporarily set to I<N>.
327326
328327=end original
329328
330329C<maxdepth> が指定されている場合、それは数値 I<N> でなければなりません;
331330C<dumpDepth> オプションが一時的に I<N> に設定されたかのように、
332331値は I<N> レベルの深さでだけダンプされます。
333332
334333=item V [pkg [vars]]
335334X<debugger command, V>
336335
337336=begin original
338337
339338Display all (or some) variables in package (defaulting to C<main>)
340339using a data pretty-printer (hashes show their keys and values so
341340you see what's what, control characters are made printable, etc.).
342341Make sure you don't put the type specifier (like C<$>) there, just
343342the symbol names, like this:
344343
345344=end original
346345
347346package (デフォルトは C<main>) 内のすべて (または、一部) の
348347変数 (variable) をデータプリティプリンタを使って表示します
349348(ハッシュは何が何か解るように、key と value を表示し、
350349コントロール文字は表示できる形にします)。
351350以下に示すように、symbol は名前だけを示し、(C<$> などの) 型識別子を
352351付けないようにしてください:
353352
354353 V DB filename line
355354
356355=begin original
357356
358357Use C<~pattern> and C<!pattern> for positive and negative regexes.
359358
360359=end original
361360
362361正と逆の正規表現のためには C<~pattern> と C<!pattern> を使ってください。
363362
364363=begin original
365364
366365This is similar to calling the C<x> command on each applicable var.
367366
368367=end original
369368
370369これは有効な変数のそれぞれについて C<x> を呼び出すのと似ています。
371370
372371=item X [vars]
373372X<debugger command, X>
374373
375374=begin original
376375
377376Same as C<V currentpackage [vars]>.
378377
379378=end original
380379
381380C<V 現在のパッケージ [vars]> と同じです。
382381
383382=item y [level [vars]]
384383X<debugger command, y>
385384
386385=begin original
387386
388387Display all (or some) lexical variables (mnemonic: C<mY> variables)
389388in the current scope or I<level> scopes higher. You can limit the
390389variables that you see with I<vars> which works exactly as it does
391390for the C<V> and C<X> commands. Requires the C<PadWalker> module
392391version 0.08 or higher; will warn if this isn't installed. Output
393392is pretty-printed in the same style as for C<V> and the format is
394393controlled by the same options.
395394
396395=end original
397396
398397現在のスコープや、I<level> だけ高いスコープの全て(またはいくつか)の
399398レキシカル変数を表示します(記憶法: C<mY> 変数)。
400399C<V> や C<X> コマンドと全く同じように、I<vars> を制定することで
401400表示される変数を制限できます。
402401バージョン 0.08 以降の C<PadWalker> モジュールが必要です;
403402もしインストールされていなければ警告されます。
404403出力は C<V> コマンドと同じスタイルにフォーマットされ、
405404このフォーマットは同じオプションで制御されます。
406405
407406=item T
408407X<debugger command, T> X<backtrace> X<stack, backtrace>
409408
410409=begin original
411410
412411Produce a stack backtrace. See below for details on its output.
413412
414413=end original
415414
416415スタックのバックトレースを行います。出力についての詳細は後述します。
417416
418417=item s [expr]
419418X<debugger command, s> X<step>
420419
421420=begin original
422421
423422Single step. Executes until the beginning of another
424423statement, descending into subroutine calls. If an expression is
425424supplied that includes function calls, it too will be single-stepped.
426425
427426=end original
428427
429428シングルステップ実行します。
430429サブルーチンをたどりながら、別の実行文の先頭に到達するまで実行します。
431430関数呼び出しを含む式が与えられた場合、これもシングルステップ実行します。
432431
433432=item n [expr]
434433X<debugger command, n>
435434
436435=begin original
437436
438437Next. Executes over subroutine calls, until the beginning
439438of the next statement. If an expression is supplied that includes
440439function calls, those functions will be executed with stops before
441440each statement.
442441
443442=end original
444443
445444ネクスト。次の実行文の先頭に到達するまで、サブルーチンにまたがって実行します。
446445関数呼び出しを含む式が与えられた場合、
447446各行毎に停止しながら関数を実行します。
448447
449448=item r
450449X<debugger command, r>
451450
452451=begin original
453452
454453Continue until the return from the current subroutine.
455454Dump the return value if the C<PrintRet> option is set (default).
456455
457456=end original
458457
459458現在のサブルーチンから戻るまで実行します。
460459C<PrintRet> がセットされていれば(デフォルトではセットされています)
461460返り値をダンプします。
462461
463462=item <CR>
464463
465464=begin original
466465
467466Repeat last C<n> or C<s> command.
468467
469468=end original
470469
471470最後の C<n> または C<s> を繰り返します。
472471
473472=item c [line|sub]
474473X<debugger command, c>
475474
476475=begin original
477476
478477Continue, optionally inserting a one-time-only breakpoint
479478at the specified line or subroutine.
480479
481480=end original
482481
483続きを実行します; オプションとして、1 回限りのブレークポイントを指定された
482続きを実行します
484行またはサに設定します。
483オプションとして、1 回限りのクポイトを
484指定された行またはサブルーチンに設定します。
485485
486486=item l
487487X<debugger command, l>
488488
489489=begin original
490490
491491List next window of lines.
492492
493493=end original
494494
495495次の 1 画面分をリスト表示します。
496496
497497=item l min+incr
498498
499499=begin original
500500
501501List C<incr+1> lines starting at C<min>.
502502
503503=end original
504504
505505C<min> から C<incr+1> 行をリスト表示します。
506506
507507=item l min-max
508508
509509=begin original
510510
511511List lines C<min> through C<max>. C<l -> is synonymous to C<->.
512512
513513=end original
514514
515515C<min> 行から C<max> 行をリスト表示します。
516516C<l -> は C<-> と同じです。
517517
518518=item l line
519519
520520=begin original
521521
522522List a single line.
523523
524524=end original
525525
526526指定行をリスト表示します。
527527
528528=item l subname
529529
530530=begin original
531531
532532List first window of lines from subroutine. I<subname> may
533533be a variable that contains a code reference.
534534
535535=end original
536536
537537サブルーチンの最初の一画面分をリスト表示します。
538538I<subname> は コードリファレンスが入った変数でも構いません。
539539
540540=item -
541541X<debugger command, ->
542542
543543=begin original
544544
545545List previous window of lines.
546546
547547=end original
548548
549549前の 1 画面分をリスト表示します。
550550
551551=item v [line]
552552X<debugger command, v>
553553
554554=begin original
555555
556556View a few lines of code around the current line.
557557
558558=end original
559559
560560指定行付近の(数行のコードをリスト表示します。
561561
562562=item .
563563X<debugger command, .>
564564
565565=begin original
566566
567567Return the internal debugger pointer to the line last
568568executed, and print out that line.
569569
570570=end original
571571
572572最後に実行した行への内部デバッガポインタを返し、
573573その行を表示します。
574574
575575=item f filename
576576X<debugger command, f>
577577
578578=begin original
579579
580580Switch to viewing a different file or C<eval> statement. If I<filename>
581581is not a full pathname found in the values of %INC, it is considered
582582a regex.
583583
584584=end original
585585
586586異なるファイルまたは C<eval> 行に表示を切り替えます。
587587もし I<filename> が %INC にあるフルパス名でなければ、
588588正規表現として扱われます。
589589
590590=begin original
591591
592592C<eval>ed strings (when accessible) are considered to be filenames:
593593C<f (eval 7)> and C<f eval 7\b> access the body of the 7th C<eval>ed string
594594(in the order of execution). The bodies of the currently executed C<eval>
595595and of C<eval>ed strings that define subroutines are saved and thus
596596accessible.
597597
598598=end original
599599
600600C<eval> した文字列は(アクセス可能なら)ファイル名として扱われます:
601601C<f (eval 7)> と C<f eval 7\b> は (実行した順で) 7 番目に C<eval> した
602602文字列の中身にアクセスします。
603603現在実行した C<eval> の中身と、サブルーチンを定義する C<eval> した
604604中身は保存されるので、アクセス可能です。
605605
606606=item /pattern/
607607
608608=begin original
609609
610610Search forwards for pattern (a Perl regex); final / is optional.
611611The search is case-insensitive by default.
612612
613613=end original
614614
615pattern を用いて Perl 正規表現による前方検索を行います; 最後の / は
615pattern を用いて Perl 正規表現による前方検索を行います
616なくてもかまいません。
616最後の / はなくてもかまいません。
617617デフォルトでは検索は大文字小文字を区別しません。
618618
619619=item ?pattern?
620620
621621=begin original
622622
623623Search backwards for pattern; final ? is optional.
624624The search is case-insensitive by default.
625625
626626=end original
627627
628pattern を用いて後方検索を行います; 最後の ? はなくてもかまいません
628pattern を用いて後方検索を行います。
629最後の ? はなくてもかまいません。
629630デフォルトでは検索は大文字小文字を区別しません。
630631
631632=item L [abw]
632633X<debugger command, L>
633634
634635=begin original
635636
636637List (default all) actions, breakpoints and watch expressions
637638
638639=end original
639640
640641ブレークポイント、アクション、ウォッチ式を
641642(デフォルトは全て)リストアップします。
642643
643644=item S [[!]regex]
644645X<debugger command, S>
645646
646647=begin original
647648
648649List subroutine names [not] matching the regex.
649650
650651=end original
651652
652653regex に一致する(または一致しない)サブルーチン名をリストアップします。
653654
654=item t [n]
655=item t
655656X<debugger command, t>
656657
657658=begin original
658659
659660Toggle trace mode (see also the C<AutoTrace> option).
660Optional argument is the maximum number of levels to trace below
661the current one; anything deeper than that will be silent.
662661
663662=end original
664663
665トレースモードの on/off を切り替えます (C<AutoTrace> オプションも
664トレースモードの on/off を切り替えます(C<AutoTrace>
666参照して下さい)
665オプションも参照して下さい)
667オプションの引数は現在のもの以下でトレースする最大レベル数です;
668これよりも深いものは沈黙します。
669666
670=item t [n] expr
667=item t expr
671668X<debugger command, t>
672669
673670=begin original
674671
675672Trace through execution of C<expr>.
676Optional first argument is the maximum number of levels to trace below
677the current one; anything deeper than that will be silent.
678673See L<perldebguts/"Frame Listing Output Examples"> for examples.
679674
680675=end original
681676
682677C<expr> の実行をトレースします。
683オプションの引数は現在のもの以下でトレースする最大レベル数です;
684これよりも深いものは沈黙します。
685678例については L<perldebguts/"Frame Listing Output Examples"> を
686679参照して下さい。
687680
688681=item b
689682X<breakpoint>
690683X<debugger command, b>
691684
692685=begin original
693686
694687Sets breakpoint on current line
695688
696689=end original
697690
698691現在の位置にブレークポイントを設定します。
699692
700693=item b [line] [condition]
701694X<breakpoint>
702695X<debugger command, b>
703696
704697=begin original
705698
706699Set a breakpoint before the given line. If a condition
707700is specified, it's evaluated each time the statement is reached: a
708701breakpoint is taken only if the condition is true. Breakpoints may
709702only be set on lines that begin an executable statement. Conditions
710703don't use C<if>:
711704
712705=end original
713706
714707与えられた行の直前にブレークポイントを設定します。
715condition が指定されると、その文にさしかかる度に評価されます: condition が
708condition が指定されると、その文にさしかかる度に評価されます
716真となったときにだけブレークポイントが働きます。
709condition が真となったときにだけブレークポイントが働きます。
717ブレークポイントは、実行可能な文で始まる行にだけ、設定できます。
710ブレークポイントは、実行可能な文で始まる行にだけ、
718condition には C<if> を使いません:
711設定できます。 condition には C<if> を使いません:
719712
720713 b 237 $x > 30
721714 b 237 ++$count237 < 11
722715 b 33 /pattern/i
723716
724=begin original
725
726If the line number is C<.>, sets a breakpoint on the current line:
727
728=end original
729
730行番号が C<.> なら、現在行にブレークポイントを設定します:
731
732 b . $n > 100
733
734=item b [file]:[line] [condition]
735X<breakpoint>
736X<debugger command, b>
737
738=begin original
739
740Set a breakpoint before the given line in a (possibly different) file. If a
741condition is specified, it's evaluated each time the statement is reached: a
742breakpoint is taken only if the condition is true. Breakpoints may only be set
743on lines that begin an executable statement. Conditions don't use C<if>:
744
745=end original
746
747ブレークポイントを(おそらくは異なった)ファイルの指定された行に設定します。
748condition が指定されると、その文にさしかかる度に評価されます: condition が
749真となったときにだけブレークポイントが働きます。
750ブレークポイントは、実行可能な文で始まる行にだけ、設定できます。
751condition には C<if> を使いません:
752
753 b lib/MyModule.pm:237 $x > 30
754 b /usr/lib/perl5/site_perl/CGI.pm:100 ++$count100 < 11
755
756717=item b subname [condition]
757718X<breakpoint>
758719X<debugger command, b>
759720
760721=begin original
761722
762723Set a breakpoint before the first line of the named subroutine. I<subname> may
763724be a variable containing a code reference (in this case I<condition>
764725is not supported).
765726
766727=end original
767728
768729サブルーチンの最初の実行可能文にブレークポイントを設定します。
769730I<subname> は コードリファレンスが入った変数でも構いません
770731(この場合は I<condition> は非対応です)。
771732
772733=item b postpone subname [condition]
773734X<breakpoint>
774735X<debugger command, b>
775736
776737=begin original
777738
778739Set a breakpoint at first line of subroutine after it is compiled.
779740
780741=end original
781742
782743コンパイル後、サブルーチンの最初の行にブレークポイントをセットします。
783744
784745=item b load filename
785746X<breakpoint>
786747X<debugger command, b>
787748
788749=begin original
789750
790751Set a breakpoint before the first executed line of the I<filename>,
791752which should be a full pathname found amongst the %INC values.
792753
793754=end original
794755
795I<filename> の最初に実行される行の手前にブレークポイントをセットします;
756I<filename> の最初に実行される行の手前にブレークポイントをセットします
796757これは %INC の値に含まれるフルパス名であるべきです。
797758
798759=item b compile subname
799760X<breakpoint>
800761X<debugger command, b>
801762
802763=begin original
803764
804765Sets a breakpoint before the first statement executed after the specified
805766subroutine is compiled.
806767
807768=end original
808769
809770指定されたサブルーチンがコンパイルされた後、最初に実行される文の手前に
810771ブレークポイントをセットします。
811772
812773=item B line
813774X<breakpoint>
814775X<debugger command, B>
815776
816777=begin original
817778
818779Delete a breakpoint from the specified I<line>.
819780
820781=end original
821782
822783I<line> で指定されたブレークポイントを削除します。
823784
824785=item B *
825786X<breakpoint>
826787X<debugger command, B>
827788
828789=begin original
829790
830791Delete all installed breakpoints.
831792
832793=end original
833794
834795すべてのブレークポイントを削除します。
835796
836=item disable [file]:[line]
837X<breakpoint>
838X<debugger command, disable>
839X<disable>
840
841=begin original
842
843Disable the breakpoint so it won't stop the execution of the program.
844Breakpoints are enabled by default and can be re-enabled using the C<enable>
845command.
846
847=end original
848
849ブレークポイントを向こうにして、プログラムの実行を止めないようにします。
850ブレークポイントはデフォルトで有効で、C<enable> コマンドを使って
851再有効化できます。
852
853=item disable [line]
854X<breakpoint>
855X<debugger command, disable>
856X<disable>
857
858=begin original
859
860Disable the breakpoint so it won't stop the execution of the program.
861Breakpoints are enabled by default and can be re-enabled using the C<enable>
862command.
863
864=end original
865
866ブレークポイントを向こうにして、プログラムの実行を止めないようにします。
867ブレークポイントはデフォルトで有効で、C<enable> コマンドを使って
868再有効化できます。
869
870=begin original
871
872This is done for a breakpoint in the current file.
873
874=end original
875
876これは現在のファイルのブレークポイントに対して行われます。
877
878=item enable [file]:[line]
879X<breakpoint>
880X<debugger command, disable>
881X<disable>
882
883=begin original
884
885Enable the breakpoint so it will stop the execution of the program.
886
887=end original
888
889ブレークポイントを有効にして、プログラムの実行を止めるようにします。
890
891=item enable [line]
892X<breakpoint>
893X<debugger command, disable>
894X<disable>
895
896=begin original
897
898Enable the breakpoint so it will stop the execution of the program.
899
900=end original
901
902ブレークポイントを有効にして、プログラムの実行を止めるようにします。
903
904=begin original
905
906This is done for a breakpoint in the current file.
907
908=end original
909
910これは現在のファイルのブレークポイントに対して行われます。
911
912797=item a [line] command
913798X<debugger command, a>
914799
915800=begin original
916801
917802Set an action to be done before the line is executed. If I<line> is
918803omitted, set an action on the line about to be executed.
919804The sequence of steps taken by the debugger is
920805
921806=end original
922807
923808その行を実行する前に行うアクションを設定します。
924809I<line> が省略されると、いままさに実行しようとしていた行に
925810アクションを設定します。
926811デバッガが実行する処理の順番は以下の通りです。
927812
928813=begin original
929814
930815 1. check for a breakpoint at this line
931816 2. print the line if necessary (tracing)
932817 3. do any actions associated with that line
933818 4. prompt user if at a breakpoint or in single-step
934819 5. evaluate line
935820
936821=end original
937822
938823 1. この行のブレークポイントをチェックします
939824 2. 必要なら行を表示します(トレース)
940825 3. この行に結び付けられたアクションを実行します
941826 4. ブレークポイントやシングルステップの場合はユーザーに確認します
942827 5. 行を評価します
943828
944829=begin original
945830
946831For example, this will print out $foo every time line
94783253 is passed:
948833
949834=end original
950835
951836例えば、以下のコードは 53 行を通過する毎に $foo を表示します。
952837
953838 a 53 print "DB FOUND $foo\n"
954839
955840=item A line
956841X<debugger command, A>
957842
958843=begin original
959844
960845Delete an action from the specified line.
961846
962847=end original
963848
964849指定された行に設定されたアクションを削除します。
850I<line> が省略されると、いままさに実行しようとしている行に設定されている
851アクションが削除されます。
965852
966853=item A *
967854X<debugger command, A>
968855
969856=begin original
970857
971858Delete all installed actions.
972859
973860=end original
974861
975862設定されたすべてのアクションを削除します。
976863
977864=item w expr
978865X<debugger command, w>
979866
980867=begin original
981868
982869Add a global watch-expression. Whenever a watched global changes the
983870debugger will stop and display the old and new values.
984871
985872=end original
986873
987874グローバルなウォッチ式を追加します。
988875グローバルな変更が行われたときは、デバッガは停止して新旧の値を表示します。
989876
990877=item W expr
991878X<debugger command, W>
992879
993880=begin original
994881
995882Delete watch-expression
996883
997884=end original
998885
999886ウォッチ式を削除します。
1000887
1001888=item W *
1002889X<debugger command, W>
1003890
1004891=begin original
1005892
1006893Delete all watch-expressions.
1007894
1008895=end original
1009896
1010897全てのウォッチ式を削除します。
1011898
1012899=item o
1013900X<debugger command, o>
1014901
1015902=begin original
1016903
1017Display all options.
904Display all options
1018905
1019906=end original
1020907
1021908全てのオプションを表示します。
1022909
1023910=item o booloption ...
1024911X<debugger command, o>
1025912
1026913=begin original
1027914
1028915Set each listed Boolean option to the value C<1>.
1029916
1030917=end original
1031918
1032919リストされた各真偽値オプションの値を C<1> に設定します。
1033920
1034921=item o anyoption? ...
1035922X<debugger command, o>
1036923
1037924=begin original
1038925
1039926Print out the value of one or more options.
1040927
1041928=end original
1042929
10439301 つ、あるいは複数のオプションの値を表示します。
1044931
1045932=item o option=value ...
1046933X<debugger command, o>
1047934
1048935=begin original
1049936
1050937Set the value of one or more options. If the value has internal
1051938whitespace, it should be quoted. For example, you could set C<o
1052939pager="less -MQeicsNfr"> to call B<less> with those specific options.
1053940You may use either single or double quotes, but if you do, you must
1054941escape any embedded instances of same sort of quote you began with,
1055942as well as any escaping any escapes that immediately precede that
1056943quote but which are not meant to escape the quote itself. In other
1057944words, you follow single-quoting rules irrespective of the quote;
1058945eg: C<o option='this isn\'t bad'> or C<o option="She said, \"Isn't
1059946it?\"">.
1060947
1061948=end original
1062949
1063950一つまたは複数のオプションをセットします。
1064951値自身に空白を含む場合、クォートする必要があります。
1065952例えば、B<less> をオプション付きで呼び出す場合は
1066953C<o pager="less -MQeicsNfr"> のようにします。
1067954シングルクォートとダブルクォートのどちらでも使えますが、クォートする場合は、
1068955クォート文字と同じ文字はエスケープする必要があります;
1069956そしてエスケープ文字自身もエスケープして、クォート文字を
1070957エスケープしているのではないことを示す必要があります。
1071958言い換えると、クォートに関わりなく、シングルクォートルールに従います;
1072959例えば: C<o option='this isn\'t bad'> や
1073960C<o option="She said, \"Isn't it?\"">
1074961
1075962=begin original
1076963
1077964For historical reasons, the C<=value> is optional, but defaults to
10789651 only where it is safe to do so--that is, mostly for Boolean
1079966options. It is always better to assign a specific value using C<=>.
1080967The C<option> can be abbreviated, but for clarity probably should
1081not be. Several options can be set together. See L</"Configurable Options">
968not be. Several options can be set together. See L<"Configurable Options">
1082969for a list of these.
1083970
1084971=end original
1085972
1086973歴史的な理由により、C<=value> は省略可能ですが、そうするのが安全な場合にのみ
1087974デフォルトは 1 です -- これは、ほとんどの場合ブール値オプションです。
1088975C<=> を使って指定した値を代入する方が常によいです。
1089976C<option> は短縮できますが、明確化のためにはそうしない方がいいでしょう。
1090977いくつかのオプションは互いにセットできます。
1091それらの一覧については L<"/Configurable Options"> を参照してください。
978それらの一覧については L<"Configurable Options"> を参照してください。
1092979
1093980=item < ?
1094981X<< debugger command, < >>
1095982
1096983=begin original
1097984
1098985List out all pre-prompt Perl command actions.
1099986
1100987=end original
1101988
1102989プロンプト表示前に実行するアクションを全て表示します。
1103990
1104991=item < [ command ]
1105992X<< debugger command, < >>
1106993
1107994=begin original
1108995
1109996Set an action (Perl command) to happen before every debugger prompt.
1110997A multi-line command may be entered by backslashing the newlines.
1111998
1112999=end original
11131000
11141001デバッガがプロンプトを出す直前に、毎回実行するアクション
11151002(Perl のコマンド)を設定します。
11161003複数行の command は、バックスラッシュと改行で書くことができます。
11171004
11181005=item < *
11191006X<< debugger command, < >>
11201007
11211008=begin original
11221009
11231010Delete all pre-prompt Perl command actions.
11241011
11251012=end original
11261013
11271014プロンプト表示前に実行するアクションを全て削除します。
11281015
11291016=item << command
11301017X<< debugger command, << >>
11311018
11321019=begin original
11331020
11341021Add an action (Perl command) to happen before every debugger prompt.
11351022A multi-line command may be entered by backwhacking the newlines.
11361023
11371024=end original
11381025
11391026デバッガがプロンプトを出す直前に、毎回実行するアクション
11401027(Perl のコマンド)を追加します。
11411028複数行の command は、バックスラッシュと改行で書くことができます。
11421029
11431030=item > ?
11441031X<< debugger command, > >>
11451032
11461033=begin original
11471034
11481035List out post-prompt Perl command actions.
11491036
11501037=end original
11511038
11521039プロンプト表示後に実行するアクションを全て表示します。
11531040
11541041=item > command
11551042X<< debugger command, > >>
11561043
11571044=begin original
11581045
11591046Set an action (Perl command) to happen after the prompt when you've
11601047just given a command to return to executing the script. A multi-line
11611048command may be entered by backslashing the newlines (we bet you
11621049couldn't have guessed this by now).
11631050
11641051=end original
11651052
11661053スクリプトの実行に戻るコマンドを入力した時に、デバッガが
11671054プロンプトを出した後で、毎回実行するアクション(Perl のコマンド)を設定します。
11681055複数行の command は、バックスラッシュと改行で書くことができます
11691056(きっとあなたは今までこのことを知らなかったはずです)。
11701057
11711058=item > *
11721059X<< debugger command, > >>
11731060
11741061=begin original
11751062
11761063Delete all post-prompt Perl command actions.
11771064
11781065=end original
11791066
11801067プロンプト表示後に実行するアクションを全て削除します。
11811068
11821069=item >> command
11831070X<<< debugger command, >> >>>
11841071
11851072=begin original
11861073
11871074Adds an action (Perl command) to happen after the prompt when you've
11881075just given a command to return to executing the script. A multi-line
11891076command may be entered by backslashing the newlines.
11901077
11911078=end original
11921079
11931080スクリプトの実行に戻るコマンドを入力した時に、デバッガが
11941081プロンプトを出した後で、毎回実行するアクション(Perl のコマンド)を追加します。
11951082複数行の command は、バックスラッシュと改行で書くことができます。
11961083
11971084=item { ?
11981085X<debugger command, {>
11991086
12001087=begin original
12011088
12021089List out pre-prompt debugger commands.
12031090
12041091=end original
12051092
12061093プロンプト表示前に実行するデバッガコマンドを表示します。
12071094
12081095=item { [ command ]
12091096
12101097=begin original
12111098
12121099Set an action (debugger command) to happen before every debugger prompt.
12131100A multi-line command may be entered in the customary fashion.
12141101
12151102=end original
12161103
12171104デバッガがプロンプトを出す前に、毎回実行するアクション(デバッガの
12181105コマンド)を設定します。
12191106複数行の command は、いつもの方法で書くことができます
12201107B<警告> もし C<command> がないと、全てのアクションが消えてしまいます!
12211108
12221109=begin original
12231110
12241111Because this command is in some senses new, a warning is issued if
12251112you appear to have accidentally entered a block instead. If that's
12261113what you mean to do, write it as with C<;{ ... }> or even
12271114C<do { ... }>.
12281115
12291116=end original
12301117
12311118このコマンドはある意味新しいので、もし代わりに間違ってブロックを
12321119入力したように見えるときには、警告が出ます。
12331120本当に奏したい場合は、C<;{ ... }> か、いっそ C<do { ... }> と
12341121書いてください。
12351122
12361123=item { *
12371124X<debugger command, {>
12381125
12391126=begin original
12401127
12411128Delete all pre-prompt debugger commands.
12421129
12431130=end original
12441131
12451132プロンプト前に実行するデバッガコマンドを全て削除します。
12461133
12471134=item {{ command
12481135X<debugger command, {{>
12491136
12501137=begin original
12511138
12521139Add an action (debugger command) to happen before every debugger prompt.
12531140A multi-line command may be entered, if you can guess how: see above.
12541141
12551142=end original
12561143
12571144毎回デバッガプロンプトを表示する前に実行するアクション(デバッガコマンド)を
12581145追加します。予測可能な方法な方法で複数行コマンドも登録できます:
12591146上記を参照してください。
12601147
12611148=item ! number
12621149X<debugger command, !>
12631150
12641151=begin original
12651152
12661153Redo a previous command (defaults to the previous command).
12671154
12681155=end original
12691156
1270以前のコマンドを再実行します(number が省略されると、直前のコマンドを
1157以前のコマンドを再実行します(number が省略されると、直前のコマンドを実行します)
1271実行します)。
12721158
12731159=item ! -number
12741160X<debugger command, !>
12751161
12761162=begin original
12771163
12781164Redo number'th previous command.
12791165
12801166=end original
12811167
12821168指定数値分前のコマンドを実行します。
12831169
12841170=item ! pattern
12851171X<debugger command, !>
12861172
12871173=begin original
12881174
12891175Redo last command that started with pattern.
12901176See C<o recallCommand>, too.
12911177
12921178=end original
12931179
12941180pattern で始まるうち、最も最近に実行されたコマンドを
12951181再実行します。
12961182C<O recallCommand> も参照して下さい。
12971183
12981184=item !! cmd
12991185X<debugger command, !!>
13001186
13011187=begin original
13021188
13031189Run cmd in a subprocess (reads from DB::IN, writes to DB::OUT) See
13041190C<o shellBang>, also. Note that the user's current shell (well,
13051191their C<$ENV{SHELL}> variable) will be used, which can interfere
13061192with proper interpretation of exit status or signal and coredump
13071193information.
13081194
13091195=end original
13101196
1311cmd をサブプロセスとして実行します(DB::IN から読み込み、DB::OUT に
1197cmd をサブプロセスとして実行します(DB::IN から読み込み、DB::OUT に書き出します)。
1312書き出します)。
13131198C<O shellBang> も参照してください。
13141199ユーザーの現在のシェル(つまり、 C<$ENV{SHELL}> 変数)が使われるので、
13151200終了コードの適切な解釈やシグナルとコアダンプの情報が妨害されるかもしれない
13161201ことに注意してください。
13171202
13181203=item source file
13191204X<debugger command, source>
13201205
13211206=begin original
13221207
13231208Read and execute debugger commands from I<file>.
13241209I<file> may itself contain C<source> commands.
13251210
13261211=end original
13271212
13281213デバッガコマンドを I<file> から読み込んで実行します。
13291214I<file> 自身に C<source> コマンドを含んでいても構いません。
13301215
13311216=item H -number
13321217X<debugger command, H>
13331218
13341219=begin original
13351220
13361221Display last n commands. Only commands longer than one character are
13371222listed. If I<number> is omitted, list them all.
13381223
13391224=end original
13401225
13411226最近の指定数値分のコマンドを表示します。
134212272 文字以上のコマンドのみが表示されます。
13431228I<number> が省略されると、全てを表示します。
13441229
13451230=item q or ^D
13461231X<debugger command, q>
13471232X<debugger command, ^D>
13481233
13491234=begin original
13501235
13511236Quit. ("quit" doesn't work for this, unless you've made an alias)
13521237This is the only supported way to exit the debugger, though typing
13531238C<exit> twice might work.
13541239
13551240=end original
13561241
13571242デバッガを終了します。
13581243(エイリアスを設定しない限り、"quit" はこの目的には使えません。)
13591244これはデバッガを終了する唯一の方法ですが、C<exit> を2回
13601245入力しても動作します。
13611246
13621247=begin original
13631248
13641249Set the C<inhibit_exit> option to 0 if you want to be able to step
13651250off the end the script. You may also need to set $finished to 0
13661251if you want to step through global destruction.
13671252
13681253=end original
13691254
13701255スクリプトの最後にステップ実行できるようにしたい場合は、
13711256C<inhibit_exit> オプションに 0 を設定してください。
13721257グローバルなデストラクタを実行してステップ実行したい場合は、
13731258$finished に 0 を設定する必要があります。
13741259
13751260=item R
13761261X<debugger command, R>
13771262
13781263=begin original
13791264
13801265Restart the debugger by C<exec()>ing a new session. We try to maintain
13811266your history across this, but internal settings and command-line options
13821267may be lost.
13831268
13841269=end original
13851270
13861271新しいセッションを C<exec()> することでデバッガを再起動します。
13871272履歴は残そうと努力しますが、内部設定やコマンドラインオプションは
13881273失われるかもしれません。
13891274
13901275=begin original
13911276
13921277The following setting are currently preserved: history, breakpoints,
13931278actions, debugger options, and the Perl command-line
13941279options B<-w>, B<-I>, and B<-e>.
13951280
13961281=end original
13971282
13981283今のところ、以下の設定は保存されます: 履歴、ブレークポイント、アクション、
13991284デバッガオプション、Perl コマンドラインオプション B<-w>, B<-I>, B<-e>。
14001285
14011286=item |dbcmd
14021287X<debugger command, |>
14031288
14041289=begin original
14051290
14061291Run the debugger command, piping DB::OUT into your current pager.
14071292
14081293=end original
14091294
14101295デバッガコマンドを実行し、DB::OUT をパイプであなたの現在のページャと繋ぎます。
14111296
14121297=item ||dbcmd
14131298X<debugger command, ||>
14141299
14151300=begin original
14161301
14171302Same as C<|dbcmd> but DB::OUT is temporarily C<select>ed as well.
14181303
14191304=end original
14201305
14211306C<|dbcmd> と同様ですが、 DB::OUT は一時的に C<select> で
14221307選択されているものになります。
14231308
14241309=item = [alias value]
14251310X<debugger command, =>
14261311
14271312=begin original
14281313
14291314Define a command alias, like
14301315
14311316=end original
14321317
14331318以下のようにコマンドエイリアスを定義する:
14341319
14351320 = quit q
14361321
14371322=begin original
14381323
14391324or list current aliases.
14401325
14411326=end original
14421327
14431328または現在のエイリアスの一覧を表示します。
14441329
14451330=item command
14461331
14471332=begin original
14481333
14491334Execute command as a Perl statement. A trailing semicolon will be
14501335supplied. If the Perl statement would otherwise be confused for a
14511336Perl debugger, use a leading semicolon, too.
14521337
14531338=end original
14541339
14551340command を Perl の文として実行します。文末のセミコロンはなくてもかまいません。
14561341Perl の文が Perl デバッガにとって紛らわしい場合は
14571342先頭にセミコロンをつけてください。
14581343
14591344=item m expr
14601345X<debugger command, m>
14611346
14621347=begin original
14631348
14641349List which methods may be called on the result of the evaluated
14651350expression. The expression may evaluated to a reference to a
14661351blessed object, or to a package name.
14671352
14681353=end original
14691354
14701355評価した表現の結果が呼び出されたメソッドを一覧表示します。
14711356表現は bless されたオブジェクトへのリファレンスか、パッケージ名として
14721357評価されます。
14731358
14741359=item M
14751360X<debugger command, M>
14761361
14771362=begin original
14781363
1479Display all loaded modules and their versions.
1364Displays all loaded modules and their versions
14801365
14811366=end original
14821367
14831368読み込まれたモジュールとバージョンを全て表示します。
14841369
14851370=item man [manpage]
14861371X<debugger command, man>
14871372
14881373=begin original
14891374
14901375Despite its name, this calls your system's default documentation
14911376viewer on the given page, or on the viewer itself if I<manpage> is
14921377omitted. If that viewer is B<man>, the current C<Config> information
14931378is used to invoke B<man> using the proper MANPATH or S<B<-M>
14941379I<manpath>> option. Failed lookups of the form C<XXX> that match
14951380known manpages of the form I<perlXXX> will be retried. This lets
14961381you type C<man debug> or C<man op> from the debugger.
14971382
14981383=end original
14991384
15001385その名前にも関わらず、これは与えられたページ(I<manpage> が省略された
15011386場合はビューワ自身)に対してシステムのデフォルトのドキュメントビューワを
15021387呼び出します。
15031388ビューワが B<man> の場合、適切な MANPATH や S<B<-M> I<manpath>>
15041389オプションを使って B<man> を起動するために、現在の C<Config> 情報が
15051390使われます。
15061391C<XXX> の形で一致する man ページの検索に失敗した場合、
15071392I<perlXXX> の形のものを再検索します。
15081393これにより、デバッガから C<man debug> や C<man op> と
15091394タイプできるようになります。
15101395
15111396=begin original
15121397
15131398On systems traditionally bereft of a usable B<man> command, the
15141399debugger invokes B<perldoc>. Occasionally this determination is
15151400incorrect due to recalcitrant vendors or rather more felicitously,
15161401to enterprising users. If you fall into either category, just
15171402manually set the $DB::doccmd variable to whatever viewer to view
15181403the Perl documentation on your system. This may be set in an rc
15191404file, or through direct assignment. We're still waiting for a
15201405working example of something along the lines of:
15211406
15221407=end original
15231408
15241409伝統的に利用可能な B<man> コマンドを奪われたシステムでは、デバッガは<
15251410B<perldoc> を起動します。
15261411反抗的なベンダーや、より適切には、積極的なユーザーによって、この判断は
15271412正しくありません。
15281413もしあなたがどちらかの分類に当てはまってしまうなら、Perl のドキュメントを
15291414表示するためにどのビューワを使うかを、手動で $DB::doccmd 変数に
15301415セットしてください。
15311416これは rc ファイルででも、直接の代入ででもセットできます。
15321417私たちは以下のような感じで、実際に動作する例を待っています:
15331418
15341419 $DB::doccmd = 'netscape -remote http://something.here/';
15351420
15361421=back
15371422
15381423=head2 Configurable Options
15391424
15401425(設定可能なオプション)
15411426
15421427=begin original
15431428
15441429The debugger has numerous options settable using the C<o> command,
15451430either interactively or from the environment or an rc file.
15461431(./.perldb or ~/.perldb under Unix.)
15471432
15481433=end original
15491434
15501435デバッガには C<O> コマンドで設定できるさまざまなオプションがあります。
15511436これは対話的、環境変数、rc ファイル (Unix では ./.perldb または
15521437~/.perldb) で設定できます。
15531438
15541439=over 12
15551440
15561441=item C<recallCommand>, C<ShellBang>
15571442X<debugger option, recallCommand>
15581443X<debugger option, ShellBang>
15591444
15601445=begin original
15611446
1562The characters used to recall a command or spawn a shell. By
1447The characters used to recall command or spawn shell. By
15631448default, both are set to C<!>, which is unfortunate.
15641449
15651450=end original
15661451
15671452再呼び出しコマンドとシェル起動に使われる文字です。
15681453デフォルトでは、残念ながら、両方とも C<!> にセットされています。
15691454
15701455=item C<pager>
15711456X<debugger option, pager>
15721457
15731458=begin original
15741459
15751460Program to use for output of pager-piped commands (those beginning
15761461with a C<|> character.) By default, C<$ENV{PAGER}> will be used.
15771462Because the debugger uses your current terminal characteristics
15781463for bold and underlining, if the chosen pager does not pass escape
15791464sequences through unchanged, the output of some debugger commands
15801465will not be readable when sent through the pager.
15811466
15821467=end original
15831468
15841469ページャにパイプされるコマンド(文字 C<|> で始まるもの)の出力に
15851470使われるプログラム。
15861471デフォルトでは、C<$ENV{PAGER}> が使われます。
15871472デバッガは強調と下線に関して現在の端末設定を使うので、もし選択した
15881473ページャがエスケープシーケンスを変更せずに通過させられない場合、
15891474一部のデバッガコマンドの出力は、ページャに送られると読めなくなるでしょう。
15901475
15911476=item C<tkRunning>
15921477X<debugger option, tkRunning>
15931478
15941479=begin original
15951480
15961481Run Tk while prompting (with ReadLine).
15971482
15981483=end original
15991484
16001485プロンプトで (ReadLine と共に) Tk を実行します。
16011486
16021487=item C<signalLevel>, C<warnLevel>, C<dieLevel>
16031488X<debugger option, signalLevel> X<debugger option, warnLevel>
16041489X<debugger option, dieLevel>
16051490
16061491=begin original
16071492
16081493Level of verbosity. By default, the debugger leaves your exceptions
16091494and warnings alone, because altering them can break correctly running
16101495programs. It will attempt to print a message when uncaught INT, BUS, or
1611SEGV signals arrive. (But see the mention of signals in L</BUGS> below.)
1496SEGV signals arrive. (But see the mention of signals in L<BUGS> below.)
16121497
16131498=end original
16141499
16151500詳細さのレベル。
16161501デフォルトでは、デバッガは例外と警告を放っておきます;
16171502これを変更すると、プログラムが正しく動かなくなることがあるからです。
16181503捕捉されていない INT, BUS, SEGV シグナルがあると、メッセージを
16191504表示しようとします。
16201505(しかし、以下の L<BUGS> のシグナルに関する注意を参照してください。)
16211506
16221507=begin original
16231508
16241509To disable this default safe mode, set these values to something higher
16251510than 0. At a level of 1, you get backtraces upon receiving any kind
16261511of warning (this is often annoying) or exception (this is
16271512often valuable). Unfortunately, the debugger cannot discern fatal
16281513exceptions from non-fatal ones. If C<dieLevel> is even 1, then your
16291514non-fatal exceptions are also traced and unceremoniously altered if they
16301515came from C<eval'ed> strings or from any kind of C<eval> within modules
16311516you're attempting to load. If C<dieLevel> is 2, the debugger doesn't
16321517care where they came from: It usurps your exception handler and prints
16331518out a trace, then modifies all exceptions with its own embellishments.
16341519This may perhaps be useful for some tracing purposes, but tends to hopelessly
16351520destroy any program that takes its exception handling seriously.
16361521
16371522=end original
16381523
16391524このデフォルトのセーフモードを無効にするには、これらの値を 0 以上に
16401525セットしてください。
16411526レベル 1 では、あらゆる種類の警告(これはしばしばうんざりさせるものです)や
16421527例外(これはしばしば価値があります)を受信した時にバックトレースを得ます。
16431528残念ながら、デバッガは致命的な例外と致命的でない例外を識別できません。
16441529C<dieLevel> は 1 であっても、致命的でない例外もトレースされ、
16451530それが C<eval された> 文字列からか、読み込もうとしたモジュール内の
16461531あらゆる種類の C<eval> からのものであるなら、突然置き換えられます。
16471532C<dieLevel> が 2 なら、デバッガは例外の出所を気にしません:
16481533例外ハンドラを横取りしてトレースを表示し、それから全ての例外を自身の装飾で
16491534修正します。
16501535これはある種のトレースの目的にはおそらく有用ですが、
16511536例外をまじめに扱っているプログラムをどうしようもなく破壊してしまう傾向が
16521537あります。
16531538
16541539=item C<AutoTrace>
16551540X<debugger option, AutoTrace>
16561541
16571542=begin original
16581543
16591544Trace mode (similar to C<t> command, but can be put into
16601545C<PERLDB_OPTS>).
16611546
16621547=end original
16631548
16641549トレースモード(C<t> コマンドと同様ですが、C<PERLDB_OPTS> に書けます)。
16651550
16661551=item C<LineInfo>
16671552X<debugger option, LineInfo>
16681553
16691554=begin original
16701555
16711556File or pipe to print line number info to. If it is a pipe (say,
16721557C<|visual_perl_db>), then a short message is used. This is the
16731558mechanism used to interact with a slave editor or visual debugger,
16741559such as the special C<vi> or C<emacs> hooks, or the C<ddd> graphical
16751560debugger.
16761561
16771562=end original
16781563
16791564行番号情報を記録するファイルまたはパイプ。
16801565これが (C<|visual_perl_db> のように) パイプの場合、短い文章が使われます。
16811566これは、特別な C<vi> や C<emacs> のフックや、C<ddd> グラフィカル
16821567デバッガのようなスレーブエディタやビジュアルデバッガと相互作用するために
16831568使われる機構です。
16841569
16851570=item C<inhibit_exit>
16861571X<debugger option, inhibit_exit>
16871572
16881573=begin original
16891574
16901575If 0, allows I<stepping off> the end of the script.
16911576
16921577=end original
16931578
169415790 だと、スクリプトの最後で I<プログラムを終了する> ことを認めます。
16951580
16961581=item C<PrintRet>
16971582X<debugger option, PrintRet>
16981583
16991584=begin original
17001585
17011586Print return value after C<r> command if set (default).
17021587
17031588=end original
17041589
17051590設定されると(デフォルト)、C<r> コマンドの後に返り値を表示します。
17061591
17071592=item C<ornaments>
17081593X<debugger option, ornaments>
17091594
17101595=begin original
17111596
17121597Affects screen appearance of the command line (see L<Term::ReadLine>).
17131598There is currently no way to disable these, which can render
17141599some output illegible on some displays, or with some pagers.
17151600This is considered a bug.
17161601
17171602=end original
17181603
17191604コマンドラインの画面への表示に影響を与えます(L<Term::ReadLine> を
17201605参照してください)。
17211606今のところ、これを無効にする方法はありません;
17221607これにより、ディスプレイやページャーによっては判読できない出力を
17231608行うことがあります。
17241609これはバグと考えられています。
17251610
17261611=item C<frame>
17271612X<debugger option, frame>
17281613
17291614=begin original
17301615
17311616Affects the printing of messages upon entry and exit from subroutines. If
17321617C<frame & 2> is false, messages are printed on entry only. (Printing
17331618on exit might be useful if interspersed with other messages.)
17341619
17351620=end original
17361621
17371622サブルーチンへの出入り時のメッセージ表示に影響を与えます。
17381623C<frame & 2> が偽なら、サブルーチンに入る時にのみメッセージを出力します。
17391624(出るときのメッセージは、他のメッセージがまき散らされているときには
17401625有用でしょう。)
17411626
17421627=begin original
17431628
17441629If C<frame & 4>, arguments to functions are printed, plus context
17451630and caller info. If C<frame & 8>, overloaded C<stringify> and
17461631C<tie>d C<FETCH> is enabled on the printed arguments. If C<frame
17471632& 16>, the return value from the subroutine is printed.
17481633
17491634=end original
17501635
17511636C<frame & 4> の場合、関数の引数に加えて、コンテキストと呼び出し元の
17521637情報を表示します。
17531638C<frame & 8> の場合、引数の表示にオーバーロードされた C<文字列化> と
17541639C<tie> した C<FETCH> が有効になります。
17551640C<frame & 16> の場合、サブルーチンからの返り値が表示されます。
17561641
17571642=begin original
17581643
17591644The length at which the argument list is truncated is governed by the
17601645next option:
17611646
17621647=end original
17631648
17641649引数リストが切り詰められた時の長さは次のオプションの管轄となります:
17651650
17661651=item C<maxTraceLen>
17671652X<debugger option, maxTraceLen>
17681653
17691654=begin original
17701655
17711656Length to truncate the argument list when the C<frame> option's
17721657bit 4 is set.
17731658
17741659=end original
17751660
17761661C<frame> オプションの bit 4 がセットされている時の引数リストを切り詰める
17771662長さ。
17781663
17791664=item C<windowSize>
17801665X<debugger option, windowSize>
17811666
17821667=begin original
17831668
17841669Change the size of code list window (default is 10 lines).
17851670
17861671=end original
17871672
17881673コードリストウィンドウの大きさを変更します(デフォルトは 10 行です)。
17891674
17901675=back
17911676
17921677=begin original
17931678
17941679The following options affect what happens with C<V>, C<X>, and C<x>
17951680commands:
17961681
17971682=end original
17981683
17991684以下のオプションは C<V>, C<X>, C<x> コマンドに影響を与えます。
18001685
18011686=over 12
18021687
18031688=item C<arrayDepth>, C<hashDepth>
18041689X<debugger option, arrayDepth> X<debugger option, hashDepth>
18051690
18061691=begin original
18071692
18081693Print only first N elements ('' for all).
18091694
18101695=end original
18111696
18121697最初の N 要素だけを表示します('' を指定すると全て表示します)。
18131698
18141699=item C<dumpDepth>
18151700X<debugger option, dumpDepth>
18161701
18171702=begin original
18181703
18191704Limit recursion depth to N levels when dumping structures.
18201705Negative values are interpreted as infinity. Default: infinity.
18211706
18221707=end original
18231708
18241709構造をダンプするときに再帰の深さを N レベルに制限します。
18251710負数を指定すると無限として解釈されます。
18261711デフォルト: 無限。
18271712
18281713=item C<compactDump>, C<veryCompact>
18291714X<debugger option, compactDump> X<debugger option, veryCompact>
18301715
18311716=begin original
18321717
18331718Change the style of array and hash output. If C<compactDump>, short array
18341719may be printed on one line.
18351720
18361721=end original
18371722
18381723配列とハッシュの出力スタイルを変更します。
18391724C<compactDump> の場合は、短い配列は 1 行で表示します。
18401725
18411726=item C<globPrint>
18421727X<debugger option, globPrint>
18431728
18441729=begin original
18451730
18461731Whether to print contents of globs.
18471732
18481733=end original
18491734
18501735グロブの内容を表示するかどうかです。
18511736
18521737=item C<DumpDBFiles>
18531738X<debugger option, DumpDBFiles>
18541739
18551740=begin original
18561741
18571742Dump arrays holding debugged files.
18581743
18591744=end original
18601745
18611746デバッグしていているファイルが保持している配列をダンプします。
18621747
18631748=item C<DumpPackages>
18641749X<debugger option, DumpPackages>
18651750
18661751=begin original
18671752
18681753Dump symbol tables of packages.
18691754
18701755=end original
18711756
18721757パッケージのシンボルテーブルをダンプします。
18731758
18741759=item C<DumpReused>
18751760X<debugger option, DumpReused>
18761761
18771762=begin original
18781763
18791764Dump contents of "reused" addresses.
18801765
18811766=end original
18821767
18831768「再利用された」アドレスの内容をダンプします。
18841769
18851770=item C<quote>, C<HighBit>, C<undefPrint>
18861771X<debugger option, quote> X<debugger option, HighBit>
18871772X<debugger option, undefPrint>
18881773
18891774=begin original
18901775
18911776Change the style of string dump. The default value for C<quote>
18921777is C<auto>; one can enable double-quotish or single-quotish format
18931778by setting it to C<"> or C<'>, respectively. By default, characters
18941779with their high bit set are printed verbatim.
18951780
18961781=end original
18971782
18981783文字列ダンプのスタイルを変更します。
18991784C<quote> のデフォルトは C<auto> です;
19001785C<"> や C<'> にセットすることでダブルクォート風やシングルクォート風に
19011786できます。
19021787デフォルトでは、最上位ビットがセットされている文字はそのまま表示されます。
19031788
19041789=item C<UsageOnly>
19051790X<debugger option, UsageOnly>
19061791
19071792=begin original
19081793
19091794Rudimentary per-package memory usage dump. Calculates total
19101795size of strings found in variables in the package. This does not
19111796include lexicals in a module's file scope, or lost in closures.
19121797
19131798=end original
19141799
19151800基本的なパッケージ単位のメモリ使用量ダンプ。
19161801パッケージ内の変数で見つかった文字列のサイズの合計を計算します。
19171802モジュールのファイルスコープ内のレキシカルや、クロージャ内で
19181803失われたものは含まれません。
19191804
1920=item C<HistFile>
1921X<debugger option, history, HistFile>
1922
1923=begin original
1924
1925The path of the file from which the history (assuming a usable
1926Term::ReadLine backend) will be read on the debugger's startup, and to which
1927it will be saved on shutdown (for persistence across sessions). Similar in
1928concept to Bash's C<.bash_history> file.
1929
1930=end original
1931
1932デバッガの起動時に読み込まれ、(セッションをまたいで永続させるために)終了時に
1933保管されるヒストリ (Term::ReadLine バックエンドが利用可能であることを
1934仮定しています) のファイルのパス。
1935Bash の C<.bash_history> ファイルと同じ考え方です。
1936
1937=item C<HistSize>
1938X<debugger option, history, HistSize>
1939
1940=begin original
1941
1942The count of the saved lines in the history (assuming C<HistFile> above).
1943
1944=end original
1945
1946ヒストリに保管される行数 (上述の C<HistFile> を仮定します)。
1947
19481805=back
19491806
19501807=begin original
19511808
19521809After the rc file is read, the debugger reads the C<$ENV{PERLDB_OPTS}>
19531810environment variable and parses this as the remainder of a "O ..."
19541811line as one might enter at the debugger prompt. You may place the
19551812initialization options C<TTY>, C<noTTY>, C<ReadLine>, and C<NonStop>
19561813there.
19571814
19581815=end original
19591816
19601817rc ファイルが読み込まれた後、デバッガは C<$ENV{PERLDB_OPTS}> 環境変数を
19611818読み込み、デバッガのプロンプトから "O ..." として入力されたかのように
19621819パースします。
19631820初期化オプション C<TTY>, C<noTTY>, C<ReadLine>, C<NonStop> も
19641821ここで設定できます。
19651822
19661823=begin original
19671824
19681825If your rc file contains:
19691826
19701827=end original
19711828
19721829rc ファイルに以下のように書くと:
19731830
19741831 parse_options("NonStop=1 LineInfo=db.out AutoTrace");
19751832
19761833=begin original
19771834
19781835then your script will run without human intervention, putting trace
19791836information into the file I<db.out>. (If you interrupt it, you'd
19801837better reset C<LineInfo> to F</dev/tty> if you expect to see anything.)
19811838
19821839=end original
19831840
19841841スクリプトは人間の介入なしに実行され、トレース情報を
19851842I<db.out> ファイルに出力します。
19861843(中断して、何も表示されない場合は、C<LineInfo> を F</dev/tty> に
19871844リセットしたほうがよいでしょう。)
19881845
19891846=over 12
19901847
19911848=item C<TTY>
19921849X<debugger option, TTY>
19931850
19941851=begin original
19951852
19961853The TTY to use for debugging I/O.
19971854
19981855=end original
19991856
20001857デバッグ I/O として TTY を使います。
20011858
20021859=item C<noTTY>
20031860X<debugger option, noTTY>
20041861
20051862=begin original
20061863
20071864If set, the debugger goes into C<NonStop> mode and will not connect to a TTY. If
20081865interrupted (or if control goes to the debugger via explicit setting of
20091866$DB::signal or $DB::single from the Perl script), it connects to a TTY
20101867specified in the C<TTY> option at startup, or to a tty found at
20111868runtime using the C<Term::Rendezvous> module of your choice.
20121869
20131870=end original
20141871
20151872セットすると、デバッガは C<NonStop> モードとなり、TTY と接続されません。
20161873もし中断された(または Perl スクリプトから明示的に $DB::signal や
20171874$DB::single をセットすることによってデバッガに制御が移った)場合、
20181875起動時に C<TTY> オプションで指定された TTY か、実行時に C<Term::Rendezvous>
20191876モジュールで選択された TTY に接続されます。
20201877
20211878=begin original
20221879
20231880This module should implement a method named C<new> that returns an object
20241881with two methods: C<IN> and C<OUT>. These should return filehandles to use
20251882for debugging input and output correspondingly. The C<new> method should
20261883inspect an argument containing the value of C<$ENV{PERLDB_NOTTY}> at
20271884startup, or C<"$ENV{HOME}/.perldbtty$$"> otherwise. This file is not
20281885inspected for proper ownership, so security hazards are theoretically
20291886possible.
20301887
20311888=end original
20321889
20331890このモジュールは、2 つのメソッド C<IN> と C<OUT> をもつオブジェクトを
20341891返すメソッド C<new> を実装する必要があります。
20351892これらはそれぞれ、デバッグ入力と出力のためのファイルハンドルを
20361893返すようにします。
20371894C<new> メソッドは起動時に C<$ENV{PERLDB_NOTTY}> の値を含んでいる
20381895引数を検査し、さもなければ C<"$ENV{HOME}/.perldbtty$$"> となります。
20391896このファイルは適切な所有権について検査されないので、
20401897理論的にはセキュリティの問題が起こり得ます。
20411898
20421899=item C<ReadLine>
20431900X<debugger option, ReadLine>
20441901
20451902=begin original
20461903
20471904If false, readline support in the debugger is disabled in order
20481905to debug applications that themselves use ReadLine.
20491906
20501907=end original
20511908
20521909偽だと、デバッグするアプリケーション自身が ReadLine を使うために、
20531910readline 対応を無効にします。
20541911
20551912=item C<NonStop>
20561913X<debugger option, NonStop>
20571914
20581915=begin original
20591916
20601917If set, the debugger goes into non-interactive mode until interrupted, or
20611918programmatically by setting $DB::signal or $DB::single.
20621919
20631920=end original
20641921
20651922設定されると、デバッガは中断されるか、プログラム的に $DB::signal か
20661923$DB::single に設定されるまで、非対話的モードとなります。
20671924
20681925=back
20691926
20701927=begin original
20711928
20721929Here's an example of using the C<$ENV{PERLDB_OPTS}> variable:
20731930
20741931=end original
20751932
20761933以下に C<$ENV{PERLDB_OPTS}> 変数を使った例を示します:
20771934
20781935 $ PERLDB_OPTS="NonStop frame=2" perl -d myprogram
20791936
20801937=begin original
20811938
20821939That will run the script B<myprogram> without human intervention,
20831940printing out the call tree with entry and exit points. Note that
20841941C<NonStop=1 frame=2> is equivalent to C<N f=2>, and that originally,
20851942options could be uniquely abbreviated by the first letter (modulo
20861943the C<Dump*> options). It is nevertheless recommended that you
20871944always spell them out in full for legibility and future compatibility.
20881945
20891946=end original
20901947
20911948これは、人間の関与なしでスクリプト B<myprogram> を実行し、進入と終了の
20921949ポイントの呼び出し木を表示します。
20931950C<NonStop=1 frame=2> は C<N f=2> と等価で、もともとオプションは最初の文字
20941951(C<Dump*> オプションを法として) に省略できます。
20951952それでもやはり、読みやすさと将来の互換性のために、常にフルスペルを書くことが
20961953推奨されます。
20971954
20981955=begin original
20991956
21001957Other examples include
21011958
21021959=end original
21031960
21041961もう一つの例としては:
21051962
21061963 $ PERLDB_OPTS="NonStop LineInfo=listing frame=2" perl -d myprogram
21071964
21081965=begin original
21091966
21101967which runs script non-interactively, printing info on each entry
21111968into a subroutine and each executed line into the file named F<listing>.
21121969(If you interrupt it, you would better reset C<LineInfo> to something
21131970"interactive"!)
21141971
21151972=end original
21161973
21171974とするとスクリプトは非対話的に実行され、サブルーチンへの進入と実行行を
21181975F<listing> という名前のファイルに記録します。
21191976(中断すると、何か「対話的」にするために C<LineInfo> をリセットする方が
21201977良いでしょう!)
21211978
21221979=begin original
21231980
21241981Other examples include (using standard shell syntax to show environment
21251982variable settings):
21261983
21271984=end original
21281985
21291986(環境変数設定を表示する標準シェル構文を使った)もう一つの例としては:
21301987
21311988 $ ( PERLDB_OPTS="NonStop frame=1 AutoTrace LineInfo=tperl.out"
21321989 perl -d myprogram )
21331990
21341991=begin original
21351992
21361993which may be useful for debugging a program that uses C<Term::ReadLine>
21371994itself. Do not forget to detach your shell from the TTY in the window that
21381995corresponds to F</dev/ttyXX>, say, by issuing a command like
21391996
21401997=end original
21411998
21421999これは C<Term::ReadLine> 地震を使っているプログラムをデバッグするのに
21432000便利です。
21442001以下のようなコマンドを使って、使用中のシェルを、F</dev/ttyXX> に対応する
21452002ウィンドウの TTY からデタッチすることを忘れないで下さい:
21462003
21472004 $ sleep 1000000
21482005
21492006=begin original
21502007
21512008See L<perldebguts/"Debugger Internals"> for details.
21522009
21532010=end original
21542011
21552012詳細については L<perldebguts/"Debugger Internals"> を参照してください。
21562013
2157=head2 Debugger Input/Output
2014=head2 Debugger input/output
21582015
21592016(デバッガの入出力)
21602017
21612018=over 8
21622019
21632020=item Prompt
21642021
21652022=begin original
21662023
21672024The debugger prompt is something like
21682025
21692026=end original
21702027
21712028デバッガのプロンプトは以下のようだったり:
21722029
21732030 DB<8>
21742031
21752032=begin original
21762033
21772034or even
21782035
21792036=end original
21802037
21812038あるいは以下のようだったりします:
21822039
21832040 DB<<17>>
21842041
21852042=begin original
21862043
21872044where that number is the command number, and which you'd use to
21882045access with the built-in B<csh>-like history mechanism. For example,
21892046C<!17> would repeat command number 17. The depth of the angle
21902047brackets indicates the nesting depth of the debugger. You could
21912048get more than one set of brackets, for example, if you'd already
21922049at a breakpoint and then printed the result of a function call that
21932050itself has a breakpoint, or you step into an expression via C<s/n/t
21942051expression> command.
21952052
21962053=end original
21972054
21982055ここで数値はコマンド番号で、組み込みの B<csh> 風履歴機構を使って
21992056アクセスするのに使います。
22002057例えば、C<!17> はコマンド番号 17 を再実行します。
22012058不等号の深さはデバッガのネストの深さを示します。
22022059例えば、既にブレークポイントにいて、それ自身にもブレークポイントを
22032060含む関数呼び出しの結果を表示させたり、C<s/n/t expression> コマンドを
22042061使って式をステップ実行したりした時に複数の不等号の組を見ることがあります。
22052062
22062063=item Multiline commands
22072064
22082065=begin original
22092066
22102067If you want to enter a multi-line command, such as a subroutine
22112068definition with several statements or a format, escape the newline
22122069that would normally end the debugger command with a backslash.
22132070Here's an example:
22142071
22152072=end original
22162073
22172074複数の文からなるサブルーチン定義やフォーマットといった、複数行の
22182075コマンドを入力したい場合は、通常はデバッガコマンドを終了させる改行を
22192076バックスラッシュでエスケープしてください。
22202077以下は例です:
22212078
22222079 DB<1> for (1..4) { \
22232080 cont: print "ok\n"; \
22242081 cont: }
22252082 ok
22262083 ok
22272084 ok
22282085 ok
22292086
22302087=begin original
22312088
22322089Note that this business of escaping a newline is specific to interactive
22332090commands typed into the debugger.
22342091
22352092=end original
22362093
22372094この、改行をエスケープする問題は、対話的にデバッガに入力されたコマンドに
22382095特有であることに注意してください。
22392096
22402097=item Stack backtrace
22412098X<backtrace> X<stack, backtrace>
22422099
22432100=begin original
22442101
22452102Here's an example of what a stack backtrace via C<T> command might
22462103look like:
22472104
22482105=end original
22492106
22502107これは、C<T> コマンドによって表示されるスタックバックトレースの
22512108例です:
22522109
2253 $ = main::infested called from file 'Ambulation.pm' line 10
2110 $ = main::infested called from file `Ambulation.pm' line 10
2254 @ = Ambulation::legs(1, 2, 3, 4) called from file 'camel_flea'
2111 @ = Ambulation::legs(1, 2, 3, 4) called from file `camel_flea' line 7
2255 line 7
2112 $ = main::pests('bactrian', 4) called from file `camel_flea' line 4
2256 $ = main::pests('bactrian', 4) called from file 'camel_flea'
2257 line 4
22582113
22592114=begin original
22602115
22612116The left-hand character up there indicates the context in which the
22622117function was called, with C<$> and C<@> meaning scalar or list
22632118contexts respectively, and C<.> meaning void context (which is
22642119actually a sort of scalar context). The display above says
22652120that you were in the function C<main::infested> when you ran the
22662121stack dump, and that it was called in scalar context from line
2267212210 of the file I<Ambulation.pm>, but without any arguments at all,
22682123meaning it was called as C<&infested>. The next stack frame shows
22692124that the function C<Ambulation::legs> was called in list context
22702125from the I<camel_flea> file with four arguments. The last stack
22712126frame shows that C<main::pests> was called in scalar context,
22722127also from I<camel_flea>, but from line 4.
22732128
22742129=end original
22752130
22762131上記の左側の文字は関数が呼び出されたコンテキストを示しています;
22772132C<$> と C<@> はそれぞれスカラコンテキストとリストコンテキストを意味し、
22782133C<.> は無効コンテキスト(実際のところはスカラコンテキストのようなもの)を
22792134意味します。
22802135上記の表示は、スタックダンプを実行したときに C<main::infested> にいて、
22812136これはファイル I<Ambulation.pm> の 10 行目から、スカラコンテキストで
22822137引数なしで呼び出されています; つまり C<&infested> のようにして
22832138呼び出されています。
22842139次のスタックフレームは、関数 C<Ambulation::legs> が I<camel_flea> から
22852140リストコンテキストで 4 つの引数と共に呼び出されています。
22862141最後のスタックフレームは、C<main::pests> が、同じファイル I<camel_flea> の
228721424 行目からスカラコンテキストで呼び出されています。
22882143
22892144=begin original
22902145
22912146If you execute the C<T> command from inside an active C<use>
22922147statement, the backtrace will contain both a C<require> frame and
2293an C<eval> frame.
2148an C<eval>) frame.
22942149
22952150=end original
22962151
22972152有効な C<use> 文の中から C<T> コマンドを実行すると、バックとレースには
22982153C<require> フレームと C<eval> フレームの両方が含まれます。
22992154
23002155=item Line Listing Format
23012156
23022157=begin original
23032158
23042159This shows the sorts of output the C<l> command can produce:
23052160
23062161=end original
23072162
23082163これは C<l> コマンドの出力を示しています:
23092164
2310 DB<<13>> l
2165 DB<<13>> l
2311 101: @i{@i} = ();
2166 101: @i{@i} = ();
2312 102:b @isa{@i,$pack} = ()
2167 102:b @isa{@i,$pack} = ()
2313 103 if(exists $i{$prevpack} || exists $isa{$pack});
2168 103 if(exists $i{$prevpack} || exists $isa{$pack});
2314 104 }
2169 104 }
2315 105
2170 105
2316 106 next
2171 106 next
2317 107==> if(exists $isa{$pack});
2172 107==> if(exists $isa{$pack});
2318 108
2173 108
2319 109:a if ($extra-- > 0) {
2174 109:a if ($extra-- > 0) {
2320 110: %isa = ($pack,1);
2175 110: %isa = ($pack,1);
23212176
23222177=begin original
23232178
23242179Breakable lines are marked with C<:>. Lines with breakpoints are
23252180marked by C<b> and those with actions by C<a>. The line that's
23262181about to be executed is marked by C<< ==> >>.
23272182
23282183=end original
23292184
23302185ブレーク可能な行には C<:> が付いています。
23312186ブレークポイントのある行には C<b> が、アクションがある行には
23322187C<a> があります。
23332188今から実行しようとしている行には C<< ==> >> が付いています。
23342189
23352190=begin original
23362191
23372192Please be aware that code in debugger listings may not look the same
23382193as your original source code. Line directives and external source
23392194filters can alter the code before Perl sees it, causing code to move
23402195from its original positions or take on entirely different forms.
23412196
23422197=end original
23432198
23442199デバッガで表示されるコードは、元のソースコードと同じように見えるとは
23452200限らないことに注意してください。
23462201行指示子と外部ソースフィルタが、Perl がコードを見る前にコードを
23472202変更することがあり、それによってコードが元の位置から移動したり、
23482203完全に異なる形になったりします。
23492204
23502205=item Frame listing
23512206
23522207=begin original
23532208
23542209When the C<frame> option is set, the debugger would print entered (and
23552210optionally exited) subroutines in different styles. See L<perldebguts>
23562211for incredibly long examples of these.
23572212
23582213=end original
23592214
23602215C<frame> オプションが設定されると、デバッガはサブルーチンに入ったとき
23612216(および出たときもオプションで)違ったスタイルで表示します。
23622217これらの非常に長い例については L<perldebguts> を参照してください。
23632218
23642219=back
23652220
2366=head2 Debugging Compile-Time Statements
2221=head2 Debugging compile-time statements
23672222
23682223(コンパイル時に実行される文のデバッグ)
23692224
23702225=begin original
23712226
23722227If you have compile-time executable statements (such as code within
23732228BEGIN, UNITCHECK and CHECK blocks or C<use> statements), these will
23742229I<not> be stopped by debugger, although C<require>s and INIT blocks
2375will, and compile-time statements can be traced with the C<AutoTrace>
2230will, and compile-time statements can be traced with C<AutoTrace>
23762231option set in C<PERLDB_OPTS>). From your own Perl code, however, you
23772232can transfer control back to the debugger using the following
23782233statement, which is harmless if the debugger is not running:
23792234
23802235=end original
23812236
23822237コンパイル時に実行される文 (BEGIN, UNITCHECK, CHECK のブロック内のコードや
2383C<use> 文) があれば、それらはデバッガによってI<止めることができません>;
2238C<use> 文) があれば、それらはデバッガによってI<止めることができま
2384C<require> と INIT ブロックは可能です; また、コンパイル時実行文は
2239せん>。C<require> と INIT ブロックは可能です
2385C<PERLDB_OPTS> で C<AutoTrace> オプションを設定することでトレースできます。
2240また、コンパイル時実行文は C<PERLDB_OPTS> で C<AutoTrace> オプションを
2241設定することでトレースできます。
23862242しかし、以下のような文を自分で Perl コードに含めれば、
2387デバッガに制御を渡すことができます; この文は、デバッガを
2243デバッガに制御を渡すことができます
2388起動していないときには、何もしません:
2244この文は、デバッガを起動していないときには、何もしません:
23892245
23902246 $DB::single = 1;
23912247
23922248=begin original
23932249
23942250If you set C<$DB::single> to 2, it's equivalent to having
23952251just typed the C<n> command, whereas a value of 1 means the C<s>
23962252command. The C<$DB::trace> variable should be set to 1 to simulate
23972253having typed the C<t> command.
23982254
23992255=end original
24002256
24012257C<$DB::single> に 2 をセットすると、C<n>コマンドをタイプしたのと
2402等価になります; 1 を設定すると C<s> コマンドとなります
2258等価になります。
22591 を設定すると C<s> コマンドとなります。
24032260C<$DB::trace> 変数は C<t> コマンドをタイプした状態をシミュレートするために
240422611 にセットするべきです。
24052262
24062263=begin original
24072264
24082265Another way to debug compile-time code is to start the debugger, set a
24092266breakpoint on the I<load> of some module:
24102267
24112268=end original
24122269
24132270コンパイル時に実行されるコードをデバッグするもう一つの方法は、
24142271モジュールの I<load> にブレークポイントを設定して:
24152272
24162273 DB<7> b load f:/perllib/lib/Carp.pm
2417 Will stop on load of 'f:/perllib/lib/Carp.pm'.
2274 Will stop on load of `f:/perllib/lib/Carp.pm'.
24182275
24192276=begin original
24202277
24212278and then restart the debugger using the C<R> command (if possible). One can use C<b
24222279compile subname> for the same purpose.
24232280
24242281=end original
24252282
24262283(可能なら) C<R> コマンドを使ってデバッガを再起動することです。
24272284C<b compile subname> も同じ目的に使えます。
24282285
24292286=head2 Debugger Customization
24302287
24312288(デバッガのカスタマイズ)
24322289
24332290=begin original
24342291
24352292The debugger probably contains enough configuration hooks that you
24362293won't ever have to modify it yourself. You may change the behaviour
2437of the debugger from within the debugger using its C<o> command, from
2294of debugger from within the debugger using its C<o> command, from
24382295the command line via the C<PERLDB_OPTS> environment variable, and
24392296from customization files.
24402297
24412298=end original
24422299
24432300デバッガにはおそらくあなたが自分で修正する必要があるとは思わないような
24442301ところまで含んだ設定フックがあります。
24452302デバッガの振る舞いは、デバッガ内で C<o> コマンドを使って変更できます;
24462303これは C<PERLDB_OPT> 環境変数経由でコマンドラインからか、設定ファイルから
24472304変更できます。
24482305
24492306=begin original
24502307
24512308You can do some customization by setting up a F<.perldb> file, which
24522309contains initialization code. For instance, you could make aliases
24532310like these (the last one is one people expect to be there):
24542311
24552312=end original
24562313
24572314初期化コードを入れたファイル .perldb を設定することでも、
24582315いくらかのカスタマイズができます。
24592316たとえば、以下のようなエイリアスが行えます (最後のものは、
24602317人々があると思っているものです):
24612318
24622319 $DB::alias{'len'} = 's/^len(.*)/p length($1)/';
24632320 $DB::alias{'stop'} = 's/^stop (at|in)/b/';
24642321 $DB::alias{'ps'} = 's/^ps\b/p scalar /';
24652322 $DB::alias{'quit'} = 's/^quit(\s*)/exit/';
24662323
24672324=begin original
24682325
24692326You can change options from F<.perldb> by using calls like this one;
24702327
24712328=end original
24722329
24732330F<.perldb> のオプションを、以下のような呼び出しによって変更できます:
24742331
24752332 parse_options("NonStop=1 LineInfo=db.out AutoTrace=1 frame=2");
24762333
24772334=begin original
24782335
24792336The code is executed in the package C<DB>. Note that F<.perldb> is
24802337processed before processing C<PERLDB_OPTS>. If F<.perldb> defines the
24812338subroutine C<afterinit>, that function is called after debugger
24822339initialization ends. F<.perldb> may be contained in the current
24832340directory, or in the home directory. Because this file is sourced
24842341in by Perl and may contain arbitrary commands, for security reasons,
24852342it must be owned by the superuser or the current user, and writable
24862343by no one but its owner.
24872344
24882345=end original
24892346
24902347コードは C<DB> パッケージで実行されます。
24912348F<.perldb> は C<PERLDB_OPTS> の前に処理されることに注意してください。
24922349F<.perldb> で C<afterinit> サブルーチンが定義されていると、この関数は
24932350デバッガの初期化終了後に呼び出されます。
24942351F<.perldb> はカレントディレクトリかホームディレクトリに置くことができます。
24952352このファイルは Perl によって実行され、任意のコマンドを含めることが
24962353できるので、セキュリティ上の理由から、スーパーユーザーが現在のユーザーに
24972354よって所有され、所有者以外には書込み禁止になっていなければなりません。
24982355
24992356=begin original
25002357
25012358You can mock TTY input to debugger by adding arbitrary commands to
25022359@DB::typeahead. For example, your F<.perldb> file might contain:
25032360
25042361=end original
25052362
25062363@DB::typeahead に任意のコマンドを追加することで、デバッガへの TTY 入力を
25072364模倣できます。
25082365例えば、あなたの F<.perldb> ファイルに以下のように書くと:
25092366
25102367 sub afterinit { push @DB::typeahead, "b 4", "b 6"; }
25112368
25122369=begin original
25132370
25142371Which would attempt to set breakpoints on lines 4 and 6 immediately
25152372after debugger initialization. Note that @DB::typeahead is not a supported
25162373interface and is subject to change in future releases.
25172374
25182375=end original
25192376
25202377デバッガ初期化の直後に 4 行目と 6 行目にブレークポイントを
25212378設定しようとします。
25222379@DB::typeahead はサポートしているインターフェースではなく、将来の
25232380リリースでは変更されることがあることに注意してください。
25242381
25252382=begin original
25262383
25272384If you want to modify the debugger, copy F<perl5db.pl> from the
25282385Perl library to another name and hack it to your heart's content.
25292386You'll then want to set your C<PERL5DB> environment variable to say
25302387something like this:
25312388
25322389=end original
25332390
25342391デバッガを変更したい場合には、perl5db.pl を Perl ライブラリから
25352392別の名前にコピーし、修正してください。それから
25362393環境変数 C<PERL5DB> には、以下のように設定する必要があるでしょう:
25372394
25382395 BEGIN { require "myperl5db.pl" }
25392396
25402397=begin original
25412398
25422399As a last resort, you could also use C<PERL5DB> to customize the debugger
25432400by directly setting internal variables or calling debugger functions.
25442401
25452402=end original
25462403
25472404最後の手段として、 C<PERL5DB> を、直接内部変数を設定したり
25482405デバッガ関数を呼び出すことでデバッガをカスタマイズすることもできます。
25492406
25502407=begin original
25512408
25522409Note that any variables and functions that are not documented in
25532410this document (or in L<perldebguts>) are considered for internal
25542411use only, and as such are subject to change without notice.
25552412
25562413=end original
25572414
25582415このドキュメント(や L<perldebguts>)に記述されていない変数や
25592416関数は内部使用専用として扱われ、予告なく変更されることがあります。
25602417
2561=head2 Readline Support / History in the Debugger
2418=head2 Readline Support / History in the debugger
25622419
25632420(readline 対応 / デバッガのヒストリ)
25642421
25652422=begin original
25662423
25672424As shipped, the only command-line history supplied is a simplistic one
25682425that checks for leading exclamation points. However, if you install
25692426the Term::ReadKey and Term::ReadLine modules from CPAN (such as
25702427Term::ReadLine::Gnu, Term::ReadLine::Perl, ...) you will
2571have full editing capabilities much like those GNU I<readline>(3) provides.
2428have full editing capabilities much like GNU I<readline>(3) provides.
25722429Look for these in the F<modules/by-module/Term> directory on CPAN.
25732430These do not support normal B<vi> command-line editing, however.
25742431
25752432=end original
25762433
25772434出荷時の状態では、コマンドライン履歴参照機能として提供されるのは、
25782435エクスクラメーションマークを付けることによる単純なものだけです。
25792436しかし、(Term::ReadLine::Gnu, Term::ReadLine::Perl, ... のように)
25802437CPAN から Term::ReadKey と Term::ReadLine のモジュールを
25812438インストールすることで、GNU I<readline>(3) が提供するような
25822439完全な編集機能が使えるようになります。
25832440これらは CPAN の F<modules/by-module/Term> ディレクトリにあります。
25842441しかし、これらは通常の B<vi> コマンドライン編集は対応していません。
25852442
25862443=begin original
25872444
25882445A rudimentary command-line completion is also available, including
25892446lexical variables in the current scope if the C<PadWalker> module
25902447is installed.
25912448
25922449=end original
25932450
25942451基本的なパッケージ単位のメモリ使用量ダンプ; C<PadWalker> モジュールが
25952452インストールされているなら現在のスコープのレキシカル変数も含みます。
25962453
25972454=begin original
25982455
25992456Without Readline support you may see the symbols "^[[A", "^[[C", "^[[B",
26002457"^[[D"", "^H", ... when using the arrow keys and/or the backspace key.
26012458
26022459=end original
26032460
26042461Readline 対応なしでは、矢印キーやバックスペースキーを使うと
26052462"^[[A", "^[[C", "^[[B", "^[[D"", "^H" のような表示を見るかもしれません。
26062463
26072464=head2 Editor Support for Debugging
26082465
26092466(デバッグのためのエディタ対応)
26102467
26112468=begin original
26122469
2613If you have the GNU's version of B<emacs> installed on your system,
2470If you have the FSF's version of B<emacs> installed on your system,
26142471it can interact with the Perl debugger to provide an integrated
26152472software development environment reminiscent of its interactions
26162473with C debuggers.
26172474
26182475=end original
26192476
2620GNU 版の B<emacs> がシステムにインストールされている場合は、
2477FSF 版の B<emacs> がシステムにインストールされている場合は、
26212478C デバッガとの連携を連想させるような、Perl デバッガとの統合
26222479ソフトウェア開発環境を提供します。
26232480
26242481=begin original
26252482
2626Recent versions of Emacs come with a
2483Perl comes with a start file for making B<emacs> act like a
2627start file for making B<emacs> act like a
26282484syntax-directed editor that understands (some of) Perl's syntax.
2629See L<perlfaq3>.
2485Look in the I<emacs> directory of the Perl source distribution.
26302486
26312487=end original
26322488
2633最近のバージョンの Emacs には B<emacs> を Perl の文法(の一部)を解釈する文法指向の
2489Perl には B<emacs> を Perl の文法(の一部)を解釈する文法指向の
26342490エディタとして振舞わせるためのスタートファイルを同梱しています。
2635L<perlfaq3> を参照してください。
2491Perl ソース配布の I<emacs> ディレクトリを参照してください。
26362492
26372493=begin original
26382494
2495A similar setup by Tom Christiansen for interacting with any
2496vendor-shipped B<vi> and the X11 window system is also available.
2497This works similarly to the integrated multiwindow support that
2498B<emacs> provides, where the debugger drives the editor. At the
2499time of this writing, however, that tool's eventual location in the
2500Perl distribution was uncertain.
2501
2502=end original
2503
2504ベンダー同梱の B<vi> および X11 ウィンドウシステムと相互作用させるための
2505Tom Christiansen による似たようなセットアップも利用可能です。
2506これは B<emacs> が提供する統合マルチウィンドウサポートと同様に動作し、
2507デバッガがエディタを制御します。
2508しかし、これを記述している時点では、このツールの Perl 配布の中での
2509最終的な位置は不確定です。
2510
2511=begin original
2512
26392513Users of B<vi> should also look into B<vim> and B<gvim>, the mousey
26402514and windy version, for coloring of Perl keywords.
26412515
26422516=end original
26432517
26442518B<vi> ユーザーは、Perl のキーワードを色付けする、マウスとウィンドウ対応の
26452519B<vim> と B<gvim> を調べてみてください。
26462520
26472521=begin original
26482522
26492523Note that only perl can truly parse Perl, so all such CASE tools
26502524fall somewhat short of the mark, especially if you don't program
26512525your Perl as a C programmer might.
26522526
26532527=end original
26542528
26552529perl のみが完全に Perl をパースできるので、これら全ての CASE ツールには
26562530足りないところがあることに注意してください; 特に C プログラマーが書くような
26572531Perl プログラムを書いていない場合はそうです。
26582532
26592533=head2 The Perl Profiler
26602534X<profile> X<profiling> X<profiler>
26612535
26622536(Perl プロファイラ)
26632537
26642538=begin original
26652539
26662540If you wish to supply an alternative debugger for Perl to run,
26672541invoke your script with a colon and a package argument given to the
2668B<-d> flag. Perl's alternative debuggers include a Perl profiler,
2542B<-d> flag. Perl's alternative debuggers include the Perl profiler,
2669L<Devel::NYTProf>, which is available separately as a CPAN
2543L<Devel::DProf>, which is included with the standard Perl
26702544distribution. To profile your Perl program in the file F<mycode.pl>,
26712545just type:
26722546
26732547=end original
26742548
26752549Perl の実行に代替デバッガを使いたい場合は、B<-d> オプションに
26762550コロンとパッケージからなる引数を付けてスクリプトを起動してください。
26772551Perl 用代替デバッガは Perl プロファイラを含む
2678L<Devel::DProf> で、CPAN 配布として別利用可能です。
2552L<Devel::DProf> で、Perl 標準配布に含まれています。
26792553ファイル F<mycode.pl> にある Perl プログラムをプロファイリングしたい
26802554場合、以下のようにします:
26812555
2682 $ perl -d:NYTProf mycode.pl
2556 $ perl -d:DProf mycode.pl
26832557
26842558=begin original
26852559
2686When the script terminates the profiler will create a database of the
2560When the script terminates the profiler will dump the profile
2687profile information that you can turn into reports using the profiler's
2561information to a file called F<tmon.out>. A tool like B<dprofpp>,
2688tools. See <perlperf> for details.
2562also supplied with the standard Perl distribution, can be used to
2563interpret the information in that profile. More powerful profilers,
2564such as C<Devel::NYTProf> are available from the CPAN: see L<perlperf>
2565for details.
26892566
26902567=end original
26912568
2692スクリプトが終了すると、プロファイラはプロファイラのツールを使ってレポートに
2569スクリプトが終了すると、プロファイラはプロファイル情報
2693変換出来るプロファイル情報のデータベースを作成します。
2570F<tmon.out> というファイルにダンプします。
2694詳しくは L<perlperf> を参照してください。
2571Perl 標準配布に含まれている B<dprofpp> のようなツールが、この
2572プロファイルの情報を解釈するのに使えます。
2573C<Devel::NYTProf> のような、より強力なプロファイラは CPAN から
2574利用可能です: 詳しくは L<perlperf> を参照してください。
26952575
2696=head1 Debugging Regular Expressions
2576=head1 Debugging regular expressions
26972577X<regular expression, debugging>
26982578X<regex, debugging> X<regexp, debugging>
26992579
27002580(正規表現のデバッグ)
27012581
27022582=begin original
27032583
27042584C<use re 'debug'> enables you to see the gory details of how the Perl
27052585regular expression engine works. In order to understand this typically
27062586voluminous output, one must not only have some idea about how regular
27072587expression matching works in general, but also know how Perl's regular
27082588expressions are internally compiled into an automaton. These matters
27092589are explored in some detail in
2710L<perldebguts/"Debugging Regular Expressions">.
2590L<perldebguts/"Debugging regular expressions">.
27112591
27122592=end original
27132593
27142594C<use re 'debug'> を指定すると、Perl 正規表現エンジンがどのように
27152595動作するかの詳細を見ることができます。
27162596この、典型的には大量の出力を理解するためには、
27172597一般的に正規表現マッチがどのように行われるかだけでなく、
27182598Perl の正規表現が内部的にどのようにオートマトンにコンパイルされるかを
27192599知らなければなりません。
27202600これらの事柄は詳細は
2721L<perldebguts/"Debugging Regular Expressions"> にあります。
2601L<perldebguts/"Debugging regular expressions"> にあります。
27222602
2723=head1 Debugging Memory Usage
2603=head1 Debugging memory usage
27242604X<memory usage>
27252605
27262606(メモリ使用のデバッグ)
27272607
27282608=begin original
27292609
27302610Perl contains internal support for reporting its own memory usage,
27312611but this is a fairly advanced concept that requires some understanding
27322612of how memory allocation works.
2733See L<perldebguts/"Debugging Perl Memory Usage"> for the details.
2613See L<perldebguts/"Debugging Perl memory usage"> for the details.
27342614
27352615=end original
27362616
2737Perl には自身のメモリ使用状況を報告するための内部機能がありますが、
2617Perl には自身のメモリ使用状況を報告するための内部機能があります
27382618しかしこれはかなり上級の概念で、メモリ割り当てがどのように行われるかに
27392619ついての理解が必要となります。
27402620詳細については
2741L<perldebguts/"Debugging Perl Memory Usage"> を参照して下さい。
2621L<perldebguts/"Debugging Perl memory usage"> を参照して下さい。
27422622
27432623=head1 SEE ALSO
27442624
27452625=begin original
27462626
2747You do have C<use strict> and C<use warnings> enabled, don't you?
2627You did try the B<-w> switch, didn't you?
27482628
27492629=end original
27502630
2751C<use strict> と C<use warnings> は有効にしていまよね?
2631B<-w> スイッチもう使いましたよね?
27522632
27532633=begin original
27542634
27552635L<perldebtut>,
27562636L<perldebguts>,
27572637L<re>,
27582638L<DB>,
2759L<Devel::NYTProf>,
2639L<Devel::DProf>,
2640L<dprofpp>,
27602641L<Dumpvalue>,
27612642and
27622643L<perlrun>.
27632644
27642645=end original
27652646
27662647L<perldebtut>,
27672648L<perldebguts>,
27682649L<re>,
27692650L<DB>,
27702651L<Devel::DProf>,
27712652L<dprofpp>,
27722653L<Dumpvalue>,
27732654L<perlrun>.
27742655
27752656=begin original
27762657
27772658When debugging a script that uses #! and is thus normally found in
27782659$PATH, the -S option causes perl to search $PATH for it, so you don't
27792660have to type the path or C<which $scriptname>.
27802661
27812662=end original
27822663
27832664#! を使っているので普通は $PATH に見つかるスクリプトをデバッグするとき、
27842665-S オプションを付けると perl は $PATH からスクリプトを探すので、
27852666パスや C<which $scriptname> をタイプする必要がなくなります。
27862667
27872668 $ perl -Sd foo.pl
27882669
27892670=head1 BUGS
27902671
27912672=begin original
27922673
27932674You cannot get stack frame information or in any fashion debug functions
27942675that were not compiled by Perl, such as those from C or C++ extensions.
27952676
27962677=end original
27972678
27982679C や C++ 拡張のような、Perl でコンパイルされていないものに対して
27992680スタックフレーム情報やあらゆるデバッグ関数を使うことはできません。
28002681
28012682=begin original
28022683
28032684If you alter your @_ arguments in a subroutine (such as with C<shift>
28042685or C<pop>), the stack backtrace will not show the original values.
28052686
28062687=end original
28072688
28082689サブルーチン内で(C<shift> や C<pop> を使って) @_ 引数を変更した場合、
28092690スタックバックトレースで元の値を表示することはできません。
28102691
28112692=begin original
28122693
28132694The debugger does not currently work in conjunction with the B<-W>
28142695command-line switch, because it itself is not free of warnings.
28152696
28162697=end original
28172698
2818デバッガは現在のところ B<-W> コマンドラインスイッチと同時に使うことは
2699デバッガは現在のところ B<-W> コマンドラインスイッチと同時に
2819できません; これ自身が警告から逃れられないからです。
2700使うことはできませんこれ自身が警告から逃れられないからです。
28202701
28212702=begin original
28222703
28232704If you're in a slow syscall (like C<wait>ing, C<accept>ing, or C<read>ing
28242705from your keyboard or a socket) and haven't set up your own C<$SIG{INT}>
28252706handler, then you won't be able to CTRL-C your way back to the debugger,
28262707because the debugger's own C<$SIG{INT}> handler doesn't understand that
28272708it needs to raise an exception to longjmp(3) out of slow syscalls.
28282709
28292710=end original
28302711
2831(キーボードやソケットからの C<wait>, C<accept>, C<read>などの)遅い
2712(キーボードやソケットからの C<wait>, C<accept>, C<read>などの)
2832システムコールを実行中で、独自の C<$SIG{INT}> ハンドラを設定していない場合、
2713遅いシステムコールを実行中で、独自の C<$SIG{INT}> ハンドラを設定していない場合、
2833デバッガに戻ってくるために CTRL-C を使うことはできません;
2714デバッガに戻ってくるために CTRL-C を使うことはできません
2834これは、デバッガ自身の C<$SIG{INT}> ハンドラが遅いシステムコールから
2715これは、デバッガ自身の C<$SIG{INT}> ハンドラが
2835longjmp(3) で出るための例外を発生させる必要性を理解しないからです。
2716遅いシステムコールから longjmp(3) で出るための例外を発生させる必要性を
2717理解しないからです。
28362718
28372719=begin meta
28382720
28392721Translate: 吉村 寿人 <JAE00534@niftyserve.or.jp> (5.000)
28402722Update: SHIRAKATA Kentaro <argrath@ub32.org> (5.6.1-)
28412723Status: completed
28422724
28432725=end meta