perldebug > 5.10.0 との差分

perldebug 5.10.0 と 5.32.0 の差分

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 the B<-w> switch?
19First of all, have you tried using L<C<use strict;>|strict> and
20L<C<use warnings;>|warnings>?
2021
2122=end original
2223
23まず最初に一言「もう B<-w> スイッチお使いになりましたか。」
24まず最初にもう L<C<use strict;>|strict> と L<C<use warnings;>|warnings>
25使ってみましたか?
2426
2527=begin original
2628
2729If you're new to the Perl debugger, you may prefer to read
28L<perldebtut>, which is a tutorial introduction to the debugger .
30L<perldebtut>, which is a tutorial introduction to the debugger.
2931
3032=end original
3133
3234もし Perl デバッガに慣れていないなら、デバッガに関するチュートリアルである
3335L<perldebtut> を読んだ方がいいかもしれません。
3436
37=begin original
38
39If you're looking for the nitty gritty details of how the debugger is
40I<implemented>, you may prefer to read L<perldebguts>.
41
42=end original
43
44デバッガがどのように I<実装されているか> に関する詳細を探している場合は、
45L<perldebguts> を読んだ方が良いでしょう。
46
3547=head1 The Perl Debugger
3648
3749=begin original
3850
3951If you invoke Perl with the B<-d> switch, your script runs under the
4052Perl source debugger. This works like an interactive Perl
4153environment, prompting for debugger commands that let you examine
4254source code, set breakpoints, get stack backtraces, change the values of
4355variables, etc. This is so convenient that you often fire up
4456the debugger all by itself just to test out Perl constructs
4557interactively to see what they do. For example:
4658X<-d>
4759
4860=end original
4961
5062Perl を B<-d> スイッチを付けて起動すれば、スクリプトは Perl ソースデバッガ
5163上で実行されることになります。
5264これは対話的な Perl 環境のように動作し、
5365ソースコードの表示、ブレークポイントの設定、スタックのバックトレース、
5466変数の値の変更、などを実行するデバッガコマンドを入力できます。
5567これはとても便利なので、単にやりたいことを対話的に試すために
5668デバッガを起動するようになるでしょう。
5769例えば:
5870X<-d>
5971
6072 $ perl -d -e 42
6173
6274=begin original
6375
6476In Perl, the debugger is not a separate program the way it usually is in the
6577typical compiled environment. Instead, the B<-d> flag tells the compiler
6678to insert source information into the parse trees it's about to hand off
6779to the interpreter. That means your code must first compile correctly
6880for the debugger to work on it. Then when the interpreter starts up, it
6981preloads a special Perl library file containing the debugger.
7082
7183=end original
7284
7385しかし、Perl デバッガは典型的なコンパイルされた環境の様に独立した
7486プログラムではありません。 その代わりに、
7587-d フラグによって、コンパイラがインタプリタに渡すパース木にソース情報を
7688埋め込むようにしています。これは、ソースがデバッガ上で動作できるためには、
7789一度正常にコンパイルできないといけないということです。
7890それからインタプリタが起動され、デバッガを含む
7991特別な Perl ライブラリをロードします。
8092
8193=begin original
8294
8395The program will halt I<right before> the first run-time executable
8496statement (but see below regarding compile-time statements) and ask you
8597to enter a debugger command. Contrary to popular expectations, whenever
8698the debugger halts and shows you a line of code, it always displays the
8799line it's I<about> to execute, rather than the one it has just executed.
88100
89101=end original
90102
91103プログラムは、最初の実行時実行文のI<直前>で停止し
92104(ただし、以下コンパイル時実行文については後述します)、以下に示すいずれかの
93105コマンドが入力されるのを待ちます。
94106よくある期待とは逆に、
95107デバッガが停止してある行のコードを表示しているときは、
96108直前に実行した行ではなく、常にI<今から実行する>行を表示します。
97109
98110=begin original
99111
100112Any command not recognized by the debugger is directly executed
101113(C<eval>'d) as Perl code in the current package. (The debugger
102114uses the DB package for keeping its own state information.)
103115
104116=end original
105117
106118デバッガが認識できないコマンドは現在のパッケージ内で Perl のコードとして
107119実行(C<eval>)されます。
108120(デバッガは自分自身の状態を保存するために DB パッケージを使います。)
109121
110122=begin original
111123
112124Note that the said C<eval> is bound by an implicit scope. As a
113125result any newly introduced lexical variable or any modified
114126capture buffer content is lost after the eval. The debugger is a
115127nice environment to learn Perl, but if you interactively experiment using
116128material which should be in the same scope, stuff it in one line.
117129
118130=end original
119131
120132C<eval> は暗黙のスコープで区切られていることに注意してください。
121133結果として、新しく導入されたレキシカル変数や変更された捕捉バッファの内容は
122134eval の後失われます。
123135デバッガは Perl を学ぶよい環境ですが、もし同じスコープ内であるべき
124136ものを使って対話的に実験したい場合は、それを 1 行に書いてください。
125137
126138=begin original
127139
128140For any text entered at the debugger prompt, leading and trailing whitespace
129141is first stripped before further processing. If a debugger command
130142coincides with some function in your own program, merely precede the
131143function with something that doesn't look like a debugger command, such
132144as a leading C<;> or perhaps a C<+>, or by wrapping it with parentheses
133145or braces.
134146
135147=end original
136148
137149デバッガコマンドとして入力された文字列は、まず先頭と末尾の
138150空白が切り詰められます。
139151デバッガコマンドがプログラムの関数名と一致する場合、
140152関数名の前に C<;> や C<+> のような、デバッガコマンドに見えない文字を
141153付け加えるか、括弧でくくってください。
142154
143=head2 Calling the debugger
155=head2 Calling the Debugger
144156
145157(デバッガを呼び出す)
146158
147159=begin original
148160
149161There are several ways to call the debugger:
150162
151163=end original
152164
153165デバッガを呼び出すにはいくつかの方法があります:
154166
155167=over 4
156168
157169=item perl -d program_name
158170
159171=begin original
160172
161173On the given program identified by C<program_name>.
162174
163175=end original
164176
165177C<program_name> で識別されるプログラムに対して。
166178
167179=item perl -d -e 0
168180
169181=begin original
170182
171183Interactively supply an arbitrary C<expression> using C<-e>.
172184
173185=end original
174186
175187C<-e> を使って指定された任意の C<expression> を対話的に。
176188
177=item perl -d:Ptkdb program_name
189=item perl -d:ptkdb program_name
178190
179191=begin original
180192
181Debug a given program via the C<Devel::Ptkdb> GUI.
193Debug a given program via the C<Devel::ptkdb> GUI.
182194
183195=end original
184196
185197C<Devel::Ptkdb> GUI 経由で与えられたプログラムをデバッグする。
186198
187199=item perl -dt threaded_program_name
188200
189201=begin original
190202
191203Debug a given program using threads (experimental).
192204
193205=end original
194206
195207スレッドを使っているプログラムをデバッグする(実験的機能)。
196208
197209=back
198210
199211=head2 Debugger Commands
200212
201213(デバッガコマンド)
202214
203215=begin original
204216
205217The interactive debugger understands the following commands:
206218
207219=end original
208220
209221対話式のデバッガは以下のコマンドを理解します:
210222
211223=over 12
212224
213225=item h
214226X<debugger command, h>
215227
216228=begin original
217229
218230Prints out a summary help message
219231
220232=end original
221233
222234サマリヘルプメッセージを表示します。
223235
224236=item h [command]
225237
226238=begin original
227239
228240Prints out a help message for the given debugger command.
229241
230242=end original
231243
232244指定されたコマンドの説明を表示します。
233245
234246=item h h
235247
236248=begin original
237249
238250The special argument of C<h h> produces the entire help page, which is quite long.
239251
240252=end original
241253
242254C<h h> という特別なコマンドは、かなり長い、ヘルプ全体を表示します。
243255
244256=begin original
245257
246258If the output of the C<h h> command (or any command, for that matter) scrolls
247259past your screen, precede the command with a leading pipe symbol so
248260that it's run through your pager, as in
249261
250262=end original
251263
252264C<h h> コマンド(や他のコマンドでも)の出力で画面がスクロールしてしまう場合、
253265以下のようにコマンドの前にパイプ記号をつけるとページャーを呼び出します:
254266
255267 DB> |h h
256268
257269=begin original
258270
259271You may change the pager which is used via C<o pager=...> command.
260272
261273=end original
262274
263275使用されるページャーは C<O pager=...> コマンドで変更できます。
264276
265277=item p expr
266278X<debugger command, p>
267279
268280=begin original
269281
270282Same as C<print {$DB::OUT} expr> in the current package. In particular,
271283because this is just Perl's own C<print> function, this means that nested
272284data structures and objects are not dumped, unlike with the C<x> command.
273285
274286=end original
275287
276288現在のパッケージでの C<print {$DB::OUT} expr> と同じです。
277289特に、これは Perl 自身の C<print> 関数なので、
278290C<x> コマンドと違って、ネストしたデータ構造やオブジェクトはダンプしません。
279291
280292=begin original
281293
282294The C<DB::OUT> filehandle is opened to F</dev/tty>, regardless of
283295where STDOUT may be redirected to.
284296
285297=end original
286298
287299STDOUT がどこにリダイレクトされていても、
288300ファイルハンドル C<DB::OUT> は F</dev/tty> に対して
289301オープンされています。
290302
291303=item x [maxdepth] expr
292304X<debugger command, x>
293305
294306=begin original
295307
296308Evaluates its expression in list context and dumps out the result in a
297309pretty-printed fashion. Nested data structures are printed out
298310recursively, unlike the real C<print> function in Perl. When dumping
299311hashes, you'll probably prefer 'x \%h' rather than 'x %h'.
300312See L<Dumpvalue> if you'd like to do this yourself.
301313
302314=end original
303315
304316式をリストコンテキストで評価し、結果を多少読みやすい形で表示します。
305ネストしたデータは再帰的に表示します
317ネストしたデータは再帰的に表示します; これは Perl の実際の C<print> 関数とは
306これは Perl の実際の C<print> 関数とは異なります。
318異なります。
307When dumping
319ハッシュをダンプするとき、おそらく 'x %h' より 'x \%h' を好むでしょう。
308hashes, you'll probably prefer 'x \%h' rather than 'x %h'.
309320これを自分自身で行いたい場合は L<Dumpvalue> を参照して下さい。
310321
311322=begin original
312323
313324The output format is governed by multiple options described under
314L<"Configurable Options">.
325L</"Configurable Options">.
315326
316327=end original
317328
318出力フォーマットは L<"Configurable Options"> に記された
329出力フォーマットは L<"/Configurable Options"> に記された
319330様々なオプションの影響を受けます。
320331
321332=begin original
322333
323334If the C<maxdepth> is included, it must be a numeral I<N>; the value is
324335dumped only I<N> levels deep, as if the C<dumpDepth> option had been
325336temporarily set to I<N>.
326337
327338=end original
328339
329340C<maxdepth> が指定されている場合、それは数値 I<N> でなければなりません;
330341C<dumpDepth> オプションが一時的に I<N> に設定されたかのように、
331342値は I<N> レベルの深さでだけダンプされます。
332343
333344=item V [pkg [vars]]
334345X<debugger command, V>
335346
336347=begin original
337348
338349Display all (or some) variables in package (defaulting to C<main>)
339350using a data pretty-printer (hashes show their keys and values so
340351you see what's what, control characters are made printable, etc.).
341352Make sure you don't put the type specifier (like C<$>) there, just
342353the symbol names, like this:
343354
344355=end original
345356
346357package (デフォルトは C<main>) 内のすべて (または、一部) の
347358変数 (variable) をデータプリティプリンタを使って表示します
348359(ハッシュは何が何か解るように、key と value を表示し、
349360コントロール文字は表示できる形にします)。
350361以下に示すように、symbol は名前だけを示し、(C<$> などの) 型識別子を
351362付けないようにしてください:
352363
353364 V DB filename line
354365
355366=begin original
356367
357368Use C<~pattern> and C<!pattern> for positive and negative regexes.
358369
359370=end original
360371
361372正と逆の正規表現のためには C<~pattern> と C<!pattern> を使ってください。
362373
363374=begin original
364375
365376This is similar to calling the C<x> command on each applicable var.
366377
367378=end original
368379
369380これは有効な変数のそれぞれについて C<x> を呼び出すのと似ています。
370381
371382=item X [vars]
372383X<debugger command, X>
373384
374385=begin original
375386
376387Same as C<V currentpackage [vars]>.
377388
378389=end original
379390
380391C<V 現在のパッケージ [vars]> と同じです。
381392
382393=item y [level [vars]]
383394X<debugger command, y>
384395
385396=begin original
386397
387398Display all (or some) lexical variables (mnemonic: C<mY> variables)
388399in the current scope or I<level> scopes higher. You can limit the
389400variables that you see with I<vars> which works exactly as it does
390401for the C<V> and C<X> commands. Requires the C<PadWalker> module
391402version 0.08 or higher; will warn if this isn't installed. Output
392403is pretty-printed in the same style as for C<V> and the format is
393404controlled by the same options.
394405
395406=end original
396407
397408現在のスコープや、I<level> だけ高いスコープの全て(またはいくつか)の
398409レキシカル変数を表示します(記憶法: C<mY> 変数)。
399410C<V> や C<X> コマンドと全く同じように、I<vars> を制定することで
400411表示される変数を制限できます。
401412バージョン 0.08 以降の C<PadWalker> モジュールが必要です;
402413もしインストールされていなければ警告されます。
403414出力は C<V> コマンドと同じスタイルにフォーマットされ、
404415このフォーマットは同じオプションで制御されます。
405416
406417=item T
407418X<debugger command, T> X<backtrace> X<stack, backtrace>
408419
409420=begin original
410421
411422Produce a stack backtrace. See below for details on its output.
412423
413424=end original
414425
415426スタックのバックトレースを行います。出力についての詳細は後述します。
416427
417428=item s [expr]
418429X<debugger command, s> X<step>
419430
420431=begin original
421432
422433Single step. Executes until the beginning of another
423434statement, descending into subroutine calls. If an expression is
424435supplied that includes function calls, it too will be single-stepped.
425436
426437=end original
427438
428439シングルステップ実行します。
429440サブルーチンをたどりながら、別の実行文の先頭に到達するまで実行します。
430441関数呼び出しを含む式が与えられた場合、これもシングルステップ実行します。
431442
432443=item n [expr]
433444X<debugger command, n>
434445
435446=begin original
436447
437448Next. Executes over subroutine calls, until the beginning
438449of the next statement. If an expression is supplied that includes
439450function calls, those functions will be executed with stops before
440451each statement.
441452
442453=end original
443454
444455ネクスト。次の実行文の先頭に到達するまで、サブルーチンにまたがって実行します。
445456関数呼び出しを含む式が与えられた場合、
446457各行毎に停止しながら関数を実行します。
447458
448459=item r
449460X<debugger command, r>
450461
451462=begin original
452463
453464Continue until the return from the current subroutine.
454465Dump the return value if the C<PrintRet> option is set (default).
455466
456467=end original
457468
458469現在のサブルーチンから戻るまで実行します。
459470C<PrintRet> がセットされていれば(デフォルトではセットされています)
460471返り値をダンプします。
461472
462473=item <CR>
463474
464475=begin original
465476
466477Repeat last C<n> or C<s> command.
467478
468479=end original
469480
470481最後の C<n> または C<s> を繰り返します。
471482
472483=item c [line|sub]
473484X<debugger command, c>
474485
475486=begin original
476487
477488Continue, optionally inserting a one-time-only breakpoint
478489at the specified line or subroutine.
479490
480491=end original
481492
482続きを実行します
493続きを実行します; オプションとして、1 回限りのブレークポイントを指定された
483オプションとして、1 回限りのクポイトを
494行またはサに設定します。
484指定された行またはサブルーチンに設定します。
485495
486496=item l
487497X<debugger command, l>
488498
489499=begin original
490500
491501List next window of lines.
492502
493503=end original
494504
495505次の 1 画面分をリスト表示します。
496506
497507=item l min+incr
498508
499509=begin original
500510
501511List C<incr+1> lines starting at C<min>.
502512
503513=end original
504514
505515C<min> から C<incr+1> 行をリスト表示します。
506516
507517=item l min-max
508518
509519=begin original
510520
511521List lines C<min> through C<max>. C<l -> is synonymous to C<->.
512522
513523=end original
514524
515525C<min> 行から C<max> 行をリスト表示します。
516526C<l -> は C<-> と同じです。
517527
518528=item l line
519529
520530=begin original
521531
522532List a single line.
523533
524534=end original
525535
526536指定行をリスト表示します。
527537
528538=item l subname
529539
530540=begin original
531541
532542List first window of lines from subroutine. I<subname> may
533543be a variable that contains a code reference.
534544
535545=end original
536546
537547サブルーチンの最初の一画面分をリスト表示します。
538548I<subname> は コードリファレンスが入った変数でも構いません。
539549
540550=item -
541551X<debugger command, ->
542552
543553=begin original
544554
545555List previous window of lines.
546556
547557=end original
548558
549559前の 1 画面分をリスト表示します。
550560
551561=item v [line]
552562X<debugger command, v>
553563
554564=begin original
555565
556566View a few lines of code around the current line.
557567
558568=end original
559569
560570指定行付近の(数行のコードをリスト表示します。
561571
562572=item .
563573X<debugger command, .>
564574
565575=begin original
566576
567577Return the internal debugger pointer to the line last
568578executed, and print out that line.
569579
570580=end original
571581
572582最後に実行した行への内部デバッガポインタを返し、
573583その行を表示します。
574584
575585=item f filename
576586X<debugger command, f>
577587
578588=begin original
579589
580590Switch to viewing a different file or C<eval> statement. If I<filename>
581591is not a full pathname found in the values of %INC, it is considered
582592a regex.
583593
584594=end original
585595
586596異なるファイルまたは C<eval> 行に表示を切り替えます。
587597もし I<filename> が %INC にあるフルパス名でなければ、
588598正規表現として扱われます。
589599
590600=begin original
591601
592602C<eval>ed strings (when accessible) are considered to be filenames:
593603C<f (eval 7)> and C<f eval 7\b> access the body of the 7th C<eval>ed string
594604(in the order of execution). The bodies of the currently executed C<eval>
595605and of C<eval>ed strings that define subroutines are saved and thus
596606accessible.
597607
598608=end original
599609
600610C<eval> した文字列は(アクセス可能なら)ファイル名として扱われます:
601611C<f (eval 7)> と C<f eval 7\b> は (実行した順で) 7 番目に C<eval> した
602612文字列の中身にアクセスします。
603613現在実行した C<eval> の中身と、サブルーチンを定義する C<eval> した
604614中身は保存されるので、アクセス可能です。
605615
606616=item /pattern/
607617
608618=begin original
609619
610620Search forwards for pattern (a Perl regex); final / is optional.
611621The search is case-insensitive by default.
612622
613623=end original
614624
615pattern を用いて Perl 正規表現による前方検索を行います
625pattern を用いて Perl 正規表現による前方検索を行います; 最後の / は
616最後の / はなくてもかまいません。
626なくてもかまいません。
617627デフォルトでは検索は大文字小文字を区別しません。
618628
619629=item ?pattern?
620630
621631=begin original
622632
623633Search backwards for pattern; final ? is optional.
624634The search is case-insensitive by default.
625635
626636=end original
627637
628pattern を用いて後方検索を行います。
638pattern を用いて後方検索を行います; 最後の ? はなくてもかまいません
629最後の ? はなくてもかまいません。
630639デフォルトでは検索は大文字小文字を区別しません。
631640
632641=item L [abw]
633642X<debugger command, L>
634643
635644=begin original
636645
637646List (default all) actions, breakpoints and watch expressions
638647
639648=end original
640649
641650ブレークポイント、アクション、ウォッチ式を
642651(デフォルトは全て)リストアップします。
643652
644653=item S [[!]regex]
645654X<debugger command, S>
646655
647656=begin original
648657
649658List subroutine names [not] matching the regex.
650659
651660=end original
652661
653662regex に一致する(または一致しない)サブルーチン名をリストアップします。
654663
655=item t
664=item t [n]
656665X<debugger command, t>
657666
658667=begin original
659668
660669Toggle trace mode (see also the C<AutoTrace> option).
670Optional argument is the maximum number of levels to trace below
671the current one; anything deeper than that will be silent.
661672
662673=end original
663674
664トレースモードの on/off を切り替えます(C<AutoTrace>
675トレースモードの on/off を切り替えます (C<AutoTrace> オプションも
665オプションも参照して下さい)
676参照して下さい)
677オプションの引数は現在のもの以下でトレースする最大レベル数です;
678これよりも深いものは沈黙します。
666679
667=item t expr
680=item t [n] expr
668681X<debugger command, t>
669682
670683=begin original
671684
672685Trace through execution of C<expr>.
686Optional first argument is the maximum number of levels to trace below
687the current one; anything deeper than that will be silent.
673688See L<perldebguts/"Frame Listing Output Examples"> for examples.
674689
675690=end original
676691
677692C<expr> の実行をトレースします。
693オプションの引数は現在のもの以下でトレースする最大レベル数です;
694これよりも深いものは沈黙します。
678695例については L<perldebguts/"Frame Listing Output Examples"> を
679696参照して下さい。
680697
681698=item b
682699X<breakpoint>
683700X<debugger command, b>
684701
685702=begin original
686703
687704Sets breakpoint on current line
688705
689706=end original
690707
691708現在の位置にブレークポイントを設定します。
692709
693710=item b [line] [condition]
694711X<breakpoint>
695712X<debugger command, b>
696713
697714=begin original
698715
699716Set a breakpoint before the given line. If a condition
700717is specified, it's evaluated each time the statement is reached: a
701718breakpoint is taken only if the condition is true. Breakpoints may
702719only be set on lines that begin an executable statement. Conditions
703720don't use C<if>:
704721
705722=end original
706723
707724与えられた行の直前にブレークポイントを設定します。
708condition が指定されると、その文にさしかかる度に評価されます
725condition が指定されると、その文にさしかかる度に評価されます: condition が
709condition が真となったときにだけブレークポイントが働きます。
726真となったときにだけブレークポイントが働きます。
710ブレークポイントは、実行可能な文で始まる行にだけ、
727ブレークポイントは、実行可能な文で始まる行にだけ、設定できます。
711設定できます。 condition には C<if> を使いません:
728condition には C<if> を使いません:
712729
713730 b 237 $x > 30
714731 b 237 ++$count237 < 11
715732 b 33 /pattern/i
716733
734=begin original
735
736If the line number is C<.>, sets a breakpoint on the current line:
737
738=end original
739
740行番号が C<.> なら、現在行にブレークポイントを設定します:
741
742 b . $n > 100
743
744=item b [file]:[line] [condition]
745X<breakpoint>
746X<debugger command, b>
747
748=begin original
749
750Set a breakpoint before the given line in a (possibly different) file. If a
751condition is specified, it's evaluated each time the statement is reached: a
752breakpoint is taken only if the condition is true. Breakpoints may only be set
753on lines that begin an executable statement. Conditions don't use C<if>:
754
755=end original
756
757ブレークポイントを(おそらくは異なった)ファイルの指定された行に設定します。
758condition が指定されると、その文にさしかかる度に評価されます: condition が
759真となったときにだけブレークポイントが働きます。
760ブレークポイントは、実行可能な文で始まる行にだけ、設定できます。
761condition には C<if> を使いません:
762
763 b lib/MyModule.pm:237 $x > 30
764 b /usr/lib/perl5/site_perl/CGI.pm:100 ++$count100 < 11
765
717766=item b subname [condition]
718767X<breakpoint>
719768X<debugger command, b>
720769
721770=begin original
722771
723772Set a breakpoint before the first line of the named subroutine. I<subname> may
724773be a variable containing a code reference (in this case I<condition>
725774is not supported).
726775
727776=end original
728777
729778サブルーチンの最初の実行可能文にブレークポイントを設定します。
730779I<subname> は コードリファレンスが入った変数でも構いません
731780(この場合は I<condition> は非対応です)。
732781
733782=item b postpone subname [condition]
734783X<breakpoint>
735784X<debugger command, b>
736785
737786=begin original
738787
739788Set a breakpoint at first line of subroutine after it is compiled.
740789
741790=end original
742791
743792コンパイル後、サブルーチンの最初の行にブレークポイントをセットします。
744793
745794=item b load filename
746795X<breakpoint>
747796X<debugger command, b>
748797
749798=begin original
750799
751800Set a breakpoint before the first executed line of the I<filename>,
752801which should be a full pathname found amongst the %INC values.
753802
754803=end original
755804
756I<filename> の最初に実行される行の手前にブレークポイントをセットします
805I<filename> の最初に実行される行の手前にブレークポイントをセットします;
757806これは %INC の値に含まれるフルパス名であるべきです。
758807
759808=item b compile subname
760809X<breakpoint>
761810X<debugger command, b>
762811
763812=begin original
764813
765814Sets a breakpoint before the first statement executed after the specified
766815subroutine is compiled.
767816
768817=end original
769818
770819指定されたサブルーチンがコンパイルされた後、最初に実行される文の手前に
771820ブレークポイントをセットします。
772821
773822=item B line
774823X<breakpoint>
775824X<debugger command, B>
776825
777826=begin original
778827
779828Delete a breakpoint from the specified I<line>.
780829
781830=end original
782831
783832I<line> で指定されたブレークポイントを削除します。
784833
785834=item B *
786835X<breakpoint>
787836X<debugger command, B>
788837
789838=begin original
790839
791840Delete all installed breakpoints.
792841
793842=end original
794843
795844すべてのブレークポイントを削除します。
796845
846=item disable [file]:[line]
847X<breakpoint>
848X<debugger command, disable>
849X<disable>
850
851=begin original
852
853Disable the breakpoint so it won't stop the execution of the program.
854Breakpoints are enabled by default and can be re-enabled using the C<enable>
855command.
856
857=end original
858
859ブレークポイントを向こうにして、プログラムの実行を止めないようにします。
860ブレークポイントはデフォルトで有効で、C<enable> コマンドを使って
861再有効化できます。
862
863=item disable [line]
864X<breakpoint>
865X<debugger command, disable>
866X<disable>
867
868=begin original
869
870Disable the breakpoint so it won't stop the execution of the program.
871Breakpoints are enabled by default and can be re-enabled using the C<enable>
872command.
873
874=end original
875
876ブレークポイントを向こうにして、プログラムの実行を止めないようにします。
877ブレークポイントはデフォルトで有効で、C<enable> コマンドを使って
878再有効化できます。
879
880=begin original
881
882This is done for a breakpoint in the current file.
883
884=end original
885
886これは現在のファイルのブレークポイントに対して行われます。
887
888=item enable [file]:[line]
889X<breakpoint>
890X<debugger command, disable>
891X<disable>
892
893=begin original
894
895Enable the breakpoint so it will stop the execution of the program.
896
897=end original
898
899ブレークポイントを有効にして、プログラムの実行を止めるようにします。
900
901=item enable [line]
902X<breakpoint>
903X<debugger command, disable>
904X<disable>
905
906=begin original
907
908Enable the breakpoint so it will stop the execution of the program.
909
910=end original
911
912ブレークポイントを有効にして、プログラムの実行を止めるようにします。
913
914=begin original
915
916This is done for a breakpoint in the current file.
917
918=end original
919
920これは現在のファイルのブレークポイントに対して行われます。
921
797922=item a [line] command
798923X<debugger command, a>
799924
800925=begin original
801926
802927Set an action to be done before the line is executed. If I<line> is
803928omitted, set an action on the line about to be executed.
804929The sequence of steps taken by the debugger is
805930
806931=end original
807932
808933その行を実行する前に行うアクションを設定します。
809934I<line> が省略されると、いままさに実行しようとしていた行に
810935アクションを設定します。
811936デバッガが実行する処理の順番は以下の通りです。
812937
813938=begin original
814939
815940 1. check for a breakpoint at this line
816941 2. print the line if necessary (tracing)
817942 3. do any actions associated with that line
818943 4. prompt user if at a breakpoint or in single-step
819944 5. evaluate line
820945
821946=end original
822947
823948 1. この行のブレークポイントをチェックします
824949 2. 必要なら行を表示します(トレース)
825950 3. この行に結び付けられたアクションを実行します
826951 4. ブレークポイントやシングルステップの場合はユーザーに確認します
827952 5. 行を評価します
828953
829954=begin original
830955
831956For example, this will print out $foo every time line
83295753 is passed:
833958
834959=end original
835960
836961例えば、以下のコードは 53 行を通過する毎に $foo を表示します。
837962
838963 a 53 print "DB FOUND $foo\n"
839964
840965=item A line
841966X<debugger command, A>
842967
843968=begin original
844969
845970Delete an action from the specified line.
846971
847972=end original
848973
849974指定された行に設定されたアクションを削除します。
850I<line> が省略されると、いままさに実行しようとしている行に設定されている
851アクションが削除されます。
852975
853976=item A *
854977X<debugger command, A>
855978
856979=begin original
857980
858981Delete all installed actions.
859982
860983=end original
861984
862985設定されたすべてのアクションを削除します。
863986
864987=item w expr
865988X<debugger command, w>
866989
867990=begin original
868991
869Add a global watch-expression. We hope you know what one of these
992Add a global watch-expression. Whenever a watched global changes the
870is, because they're supposed to be obvious.
993debugger will stop and display the old and new values.
871994
872995=end original
873996
874グローバルなウォッチ式を追加します。この機能はよくあるものなので、
997グローバルなウォッチ式を追加します。
875どういうものかはかってもらえる思います。
998グローバルな変更が行れたきは、デバッガは停止して新旧の値を表示します。
876999
8771000=item W expr
8781001X<debugger command, W>
8791002
8801003=begin original
8811004
8821005Delete watch-expression
8831006
8841007=end original
8851008
8861009ウォッチ式を削除します。
8871010
8881011=item W *
8891012X<debugger command, W>
8901013
8911014=begin original
8921015
8931016Delete all watch-expressions.
8941017
8951018=end original
8961019
8971020全てのウォッチ式を削除します。
8981021
8991022=item o
9001023X<debugger command, o>
9011024
9021025=begin original
9031026
904Display all options
1027Display all options.
9051028
9061029=end original
9071030
9081031全てのオプションを表示します。
9091032
9101033=item o booloption ...
9111034X<debugger command, o>
9121035
9131036=begin original
9141037
9151038Set each listed Boolean option to the value C<1>.
9161039
9171040=end original
9181041
9191042リストされた各真偽値オプションの値を C<1> に設定します。
9201043
9211044=item o anyoption? ...
9221045X<debugger command, o>
9231046
9241047=begin original
9251048
9261049Print out the value of one or more options.
9271050
9281051=end original
9291052
93010531 つ、あるいは複数のオプションの値を表示します。
9311054
9321055=item o option=value ...
9331056X<debugger command, o>
9341057
9351058=begin original
9361059
9371060Set the value of one or more options. If the value has internal
9381061whitespace, it should be quoted. For example, you could set C<o
9391062pager="less -MQeicsNfr"> to call B<less> with those specific options.
9401063You may use either single or double quotes, but if you do, you must
9411064escape any embedded instances of same sort of quote you began with,
9421065as well as any escaping any escapes that immediately precede that
9431066quote but which are not meant to escape the quote itself. In other
9441067words, you follow single-quoting rules irrespective of the quote;
9451068eg: C<o option='this isn\'t bad'> or C<o option="She said, \"Isn't
9461069it?\"">.
9471070
9481071=end original
9491072
9501073一つまたは複数のオプションをセットします。
9511074値自身に空白を含む場合、クォートする必要があります。
9521075例えば、B<less> をオプション付きで呼び出す場合は
9531076C<o pager="less -MQeicsNfr"> のようにします。
9541077シングルクォートとダブルクォートのどちらでも使えますが、クォートする場合は、
9551078クォート文字と同じ文字はエスケープする必要があります;
9561079そしてエスケープ文字自身もエスケープして、クォート文字を
9571080エスケープしているのではないことを示す必要があります。
9581081言い換えると、クォートに関わりなく、シングルクォートルールに従います;
9591082例えば: C<o option='this isn\'t bad'> や
9601083C<o option="She said, \"Isn't it?\"">
9611084
9621085=begin original
9631086
9641087For historical reasons, the C<=value> is optional, but defaults to
96510881 only where it is safe to do so--that is, mostly for Boolean
9661089options. It is always better to assign a specific value using C<=>.
9671090The C<option> can be abbreviated, but for clarity probably should
968not be. Several options can be set together. See L<"Configurable Options">
1091not be. Several options can be set together. See L</"Configurable Options">
9691092for a list of these.
9701093
9711094=end original
9721095
9731096歴史的な理由により、C<=value> は省略可能ですが、そうするのが安全な場合にのみ
9741097デフォルトは 1 です -- これは、ほとんどの場合ブール値オプションです。
9751098C<=> を使って指定した値を代入する方が常によいです。
9761099C<option> は短縮できますが、明確化のためにはそうしない方がいいでしょう。
9771100いくつかのオプションは互いにセットできます。
978それらの一覧については L<"Configurable Options"> を参照してください。
1101それらの一覧については L<"/Configurable Options"> を参照してください。
9791102
9801103=item < ?
9811104X<< debugger command, < >>
9821105
9831106=begin original
9841107
9851108List out all pre-prompt Perl command actions.
9861109
9871110=end original
9881111
9891112プロンプト表示前に実行するアクションを全て表示します。
9901113
9911114=item < [ command ]
9921115X<< debugger command, < >>
9931116
9941117=begin original
9951118
9961119Set an action (Perl command) to happen before every debugger prompt.
9971120A multi-line command may be entered by backslashing the newlines.
9981121
9991122=end original
10001123
10011124デバッガがプロンプトを出す直前に、毎回実行するアクション
10021125(Perl のコマンド)を設定します。
10031126複数行の command は、バックスラッシュと改行で書くことができます。
10041127
10051128=item < *
10061129X<< debugger command, < >>
10071130
10081131=begin original
10091132
10101133Delete all pre-prompt Perl command actions.
10111134
10121135=end original
10131136
10141137プロンプト表示前に実行するアクションを全て削除します。
10151138
10161139=item << command
10171140X<< debugger command, << >>
10181141
10191142=begin original
10201143
10211144Add an action (Perl command) to happen before every debugger prompt.
10221145A multi-line command may be entered by backwhacking the newlines.
10231146
10241147=end original
10251148
10261149デバッガがプロンプトを出す直前に、毎回実行するアクション
10271150(Perl のコマンド)を追加します。
10281151複数行の command は、バックスラッシュと改行で書くことができます。
10291152
10301153=item > ?
10311154X<< debugger command, > >>
10321155
10331156=begin original
10341157
10351158List out post-prompt Perl command actions.
10361159
10371160=end original
10381161
10391162プロンプト表示後に実行するアクションを全て表示します。
10401163
10411164=item > command
10421165X<< debugger command, > >>
10431166
10441167=begin original
10451168
10461169Set an action (Perl command) to happen after the prompt when you've
10471170just given a command to return to executing the script. A multi-line
10481171command may be entered by backslashing the newlines (we bet you
10491172couldn't have guessed this by now).
10501173
10511174=end original
10521175
10531176スクリプトの実行に戻るコマンドを入力した時に、デバッガが
10541177プロンプトを出した後で、毎回実行するアクション(Perl のコマンド)を設定します。
10551178複数行の command は、バックスラッシュと改行で書くことができます
10561179(きっとあなたは今までこのことを知らなかったはずです)。
10571180
10581181=item > *
10591182X<< debugger command, > >>
10601183
10611184=begin original
10621185
10631186Delete all post-prompt Perl command actions.
10641187
10651188=end original
10661189
10671190プロンプト表示後に実行するアクションを全て削除します。
10681191
10691192=item >> command
10701193X<<< debugger command, >> >>>
10711194
10721195=begin original
10731196
10741197Adds an action (Perl command) to happen after the prompt when you've
10751198just given a command to return to executing the script. A multi-line
10761199command may be entered by backslashing the newlines.
10771200
10781201=end original
10791202
10801203スクリプトの実行に戻るコマンドを入力した時に、デバッガが
10811204プロンプトを出した後で、毎回実行するアクション(Perl のコマンド)を追加します。
10821205複数行の command は、バックスラッシュと改行で書くことができます。
10831206
10841207=item { ?
10851208X<debugger command, {>
10861209
10871210=begin original
10881211
10891212List out pre-prompt debugger commands.
10901213
10911214=end original
10921215
10931216プロンプト表示前に実行するデバッガコマンドを表示します。
10941217
10951218=item { [ command ]
10961219
10971220=begin original
10981221
10991222Set an action (debugger command) to happen before every debugger prompt.
11001223A multi-line command may be entered in the customary fashion.
11011224
11021225=end original
11031226
11041227デバッガがプロンプトを出す前に、毎回実行するアクション(デバッガの
11051228コマンド)を設定します。
11061229複数行の command は、いつもの方法で書くことができます
11071230B<警告> もし C<command> がないと、全てのアクションが消えてしまいます!
11081231
11091232=begin original
11101233
11111234Because this command is in some senses new, a warning is issued if
11121235you appear to have accidentally entered a block instead. If that's
11131236what you mean to do, write it as with C<;{ ... }> or even
11141237C<do { ... }>.
11151238
11161239=end original
11171240
11181241このコマンドはある意味新しいので、もし代わりに間違ってブロックを
11191242入力したように見えるときには、警告が出ます。
11201243本当に奏したい場合は、C<;{ ... }> か、いっそ C<do { ... }> と
11211244書いてください。
11221245
11231246=item { *
11241247X<debugger command, {>
11251248
11261249=begin original
11271250
11281251Delete all pre-prompt debugger commands.
11291252
11301253=end original
11311254
11321255プロンプト前に実行するデバッガコマンドを全て削除します。
11331256
11341257=item {{ command
11351258X<debugger command, {{>
11361259
11371260=begin original
11381261
11391262Add an action (debugger command) to happen before every debugger prompt.
11401263A multi-line command may be entered, if you can guess how: see above.
11411264
11421265=end original
11431266
11441267毎回デバッガプロンプトを表示する前に実行するアクション(デバッガコマンド)を
11451268追加します。予測可能な方法な方法で複数行コマンドも登録できます:
11461269上記を参照してください。
11471270
11481271=item ! number
11491272X<debugger command, !>
11501273
11511274=begin original
11521275
11531276Redo a previous command (defaults to the previous command).
11541277
11551278=end original
11561279
1157以前のコマンドを再実行します(number が省略されると、直前のコマンドを実行します)
1280以前のコマンドを再実行します(number が省略されると、直前のコマンドを
1281実行します)。
11581282
11591283=item ! -number
11601284X<debugger command, !>
11611285
11621286=begin original
11631287
11641288Redo number'th previous command.
11651289
11661290=end original
11671291
11681292指定数値分前のコマンドを実行します。
11691293
11701294=item ! pattern
11711295X<debugger command, !>
11721296
11731297=begin original
11741298
11751299Redo last command that started with pattern.
11761300See C<o recallCommand>, too.
11771301
11781302=end original
11791303
11801304pattern で始まるうち、最も最近に実行されたコマンドを
11811305再実行します。
11821306C<O recallCommand> も参照して下さい。
11831307
11841308=item !! cmd
11851309X<debugger command, !!>
11861310
11871311=begin original
11881312
11891313Run cmd in a subprocess (reads from DB::IN, writes to DB::OUT) See
11901314C<o shellBang>, also. Note that the user's current shell (well,
11911315their C<$ENV{SHELL}> variable) will be used, which can interfere
11921316with proper interpretation of exit status or signal and coredump
11931317information.
11941318
11951319=end original
11961320
1197cmd をサブプロセスとして実行します(DB::IN から読み込み、DB::OUT に書き出します)。
1321cmd をサブプロセスとして実行します(DB::IN から読み込み、DB::OUT に
1322書き出します)。
11981323C<O shellBang> も参照してください。
11991324ユーザーの現在のシェル(つまり、 C<$ENV{SHELL}> 変数)が使われるので、
12001325終了コードの適切な解釈やシグナルとコアダンプの情報が妨害されるかもしれない
12011326ことに注意してください。
12021327
12031328=item source file
12041329X<debugger command, source>
12051330
12061331=begin original
12071332
12081333Read and execute debugger commands from I<file>.
12091334I<file> may itself contain C<source> commands.
12101335
12111336=end original
12121337
12131338デバッガコマンドを I<file> から読み込んで実行します。
12141339I<file> 自身に C<source> コマンドを含んでいても構いません。
12151340
12161341=item H -number
12171342X<debugger command, H>
12181343
12191344=begin original
12201345
12211346Display last n commands. Only commands longer than one character are
12221347listed. If I<number> is omitted, list them all.
12231348
12241349=end original
12251350
12261351最近の指定数値分のコマンドを表示します。
122713522 文字以上のコマンドのみが表示されます。
12281353I<number> が省略されると、全てを表示します。
12291354
12301355=item q or ^D
12311356X<debugger command, q>
12321357X<debugger command, ^D>
12331358
12341359=begin original
12351360
12361361Quit. ("quit" doesn't work for this, unless you've made an alias)
12371362This is the only supported way to exit the debugger, though typing
12381363C<exit> twice might work.
12391364
12401365=end original
12411366
12421367デバッガを終了します。
12431368(エイリアスを設定しない限り、"quit" はこの目的には使えません。)
12441369これはデバッガを終了する唯一の方法ですが、C<exit> を2回
12451370入力しても動作します。
12461371
12471372=begin original
12481373
12491374Set the C<inhibit_exit> option to 0 if you want to be able to step
12501375off the end the script. You may also need to set $finished to 0
12511376if you want to step through global destruction.
12521377
12531378=end original
12541379
12551380スクリプトの最後にステップ実行できるようにしたい場合は、
12561381C<inhibit_exit> オプションに 0 を設定してください。
12571382グローバルなデストラクタを実行してステップ実行したい場合は、
12581383$finished に 0 を設定する必要があります。
12591384
12601385=item R
12611386X<debugger command, R>
12621387
12631388=begin original
12641389
12651390Restart the debugger by C<exec()>ing a new session. We try to maintain
12661391your history across this, but internal settings and command-line options
12671392may be lost.
12681393
12691394=end original
12701395
12711396新しいセッションを C<exec()> することでデバッガを再起動します。
12721397履歴は残そうと努力しますが、内部設定やコマンドラインオプションは
12731398失われるかもしれません。
12741399
12751400=begin original
12761401
12771402The following setting are currently preserved: history, breakpoints,
12781403actions, debugger options, and the Perl command-line
12791404options B<-w>, B<-I>, and B<-e>.
12801405
12811406=end original
12821407
12831408今のところ、以下の設定は保存されます: 履歴、ブレークポイント、アクション、
12841409デバッガオプション、Perl コマンドラインオプション B<-w>, B<-I>, B<-e>。
12851410
12861411=item |dbcmd
12871412X<debugger command, |>
12881413
12891414=begin original
12901415
12911416Run the debugger command, piping DB::OUT into your current pager.
12921417
12931418=end original
12941419
12951420デバッガコマンドを実行し、DB::OUT をパイプであなたの現在のページャと繋ぎます。
12961421
12971422=item ||dbcmd
12981423X<debugger command, ||>
12991424
13001425=begin original
13011426
13021427Same as C<|dbcmd> but DB::OUT is temporarily C<select>ed as well.
13031428
13041429=end original
13051430
13061431C<|dbcmd> と同様ですが、 DB::OUT は一時的に C<select> で
13071432選択されているものになります。
13081433
13091434=item = [alias value]
13101435X<debugger command, =>
13111436
13121437=begin original
13131438
13141439Define a command alias, like
13151440
13161441=end original
13171442
13181443以下のようにコマンドエイリアスを定義する:
13191444
13201445 = quit q
13211446
13221447=begin original
13231448
13241449or list current aliases.
13251450
13261451=end original
13271452
13281453または現在のエイリアスの一覧を表示します。
13291454
13301455=item command
13311456
13321457=begin original
13331458
13341459Execute command as a Perl statement. A trailing semicolon will be
13351460supplied. If the Perl statement would otherwise be confused for a
13361461Perl debugger, use a leading semicolon, too.
13371462
13381463=end original
13391464
13401465command を Perl の文として実行します。文末のセミコロンはなくてもかまいません。
13411466Perl の文が Perl デバッガにとって紛らわしい場合は
13421467先頭にセミコロンをつけてください。
13431468
13441469=item m expr
13451470X<debugger command, m>
13461471
13471472=begin original
13481473
13491474List which methods may be called on the result of the evaluated
13501475expression. The expression may evaluated to a reference to a
13511476blessed object, or to a package name.
13521477
13531478=end original
13541479
13551480評価した表現の結果が呼び出されたメソッドを一覧表示します。
13561481表現は bless されたオブジェクトへのリファレンスか、パッケージ名として
13571482評価されます。
13581483
13591484=item M
13601485X<debugger command, M>
13611486
13621487=begin original
13631488
1364Displays all loaded modules and their versions
1489Display all loaded modules and their versions.
13651490
13661491=end original
13671492
13681493読み込まれたモジュールとバージョンを全て表示します。
13691494
13701495=item man [manpage]
13711496X<debugger command, man>
13721497
13731498=begin original
13741499
13751500Despite its name, this calls your system's default documentation
13761501viewer on the given page, or on the viewer itself if I<manpage> is
13771502omitted. If that viewer is B<man>, the current C<Config> information
13781503is used to invoke B<man> using the proper MANPATH or S<B<-M>
13791504I<manpath>> option. Failed lookups of the form C<XXX> that match
13801505known manpages of the form I<perlXXX> will be retried. This lets
13811506you type C<man debug> or C<man op> from the debugger.
13821507
13831508=end original
13841509
13851510その名前にも関わらず、これは与えられたページ(I<manpage> が省略された
13861511場合はビューワ自身)に対してシステムのデフォルトのドキュメントビューワを
13871512呼び出します。
13881513ビューワが B<man> の場合、適切な MANPATH や S<B<-M> I<manpath>>
13891514オプションを使って B<man> を起動するために、現在の C<Config> 情報が
13901515使われます。
13911516C<XXX> の形で一致する man ページの検索に失敗した場合、
13921517I<perlXXX> の形のものを再検索します。
13931518これにより、デバッガから C<man debug> や C<man op> と
13941519タイプできるようになります。
13951520
13961521=begin original
13971522
13981523On systems traditionally bereft of a usable B<man> command, the
13991524debugger invokes B<perldoc>. Occasionally this determination is
14001525incorrect due to recalcitrant vendors or rather more felicitously,
14011526to enterprising users. If you fall into either category, just
14021527manually set the $DB::doccmd variable to whatever viewer to view
14031528the Perl documentation on your system. This may be set in an rc
14041529file, or through direct assignment. We're still waiting for a
14051530working example of something along the lines of:
14061531
14071532=end original
14081533
14091534伝統的に利用可能な B<man> コマンドを奪われたシステムでは、デバッガは<
14101535B<perldoc> を起動します。
14111536反抗的なベンダーや、より適切には、積極的なユーザーによって、この判断は
14121537正しくありません。
14131538もしあなたがどちらかの分類に当てはまってしまうなら、Perl のドキュメントを
14141539表示するためにどのビューワを使うかを、手動で $DB::doccmd 変数に
14151540セットしてください。
14161541これは rc ファイルででも、直接の代入ででもセットできます。
14171542私たちは以下のような感じで、実際に動作する例を待っています:
14181543
14191544 $DB::doccmd = 'netscape -remote http://something.here/';
14201545
14211546=back
14221547
14231548=head2 Configurable Options
14241549
14251550(設定可能なオプション)
14261551
14271552=begin original
14281553
14291554The debugger has numerous options settable using the C<o> command,
14301555either interactively or from the environment or an rc file.
14311556(./.perldb or ~/.perldb under Unix.)
14321557
14331558=end original
14341559
14351560デバッガには C<O> コマンドで設定できるさまざまなオプションがあります。
14361561これは対話的、環境変数、rc ファイル (Unix では ./.perldb または
14371562~/.perldb) で設定できます。
14381563
14391564=over 12
14401565
14411566=item C<recallCommand>, C<ShellBang>
14421567X<debugger option, recallCommand>
14431568X<debugger option, ShellBang>
14441569
14451570=begin original
14461571
1447The characters used to recall command or spawn shell. By
1572The characters used to recall a command or spawn a shell. By
14481573default, both are set to C<!>, which is unfortunate.
14491574
14501575=end original
14511576
14521577再呼び出しコマンドとシェル起動に使われる文字です。
14531578デフォルトでは、残念ながら、両方とも C<!> にセットされています。
14541579
14551580=item C<pager>
14561581X<debugger option, pager>
14571582
14581583=begin original
14591584
14601585Program to use for output of pager-piped commands (those beginning
14611586with a C<|> character.) By default, C<$ENV{PAGER}> will be used.
14621587Because the debugger uses your current terminal characteristics
14631588for bold and underlining, if the chosen pager does not pass escape
14641589sequences through unchanged, the output of some debugger commands
14651590will not be readable when sent through the pager.
14661591
14671592=end original
14681593
14691594ページャにパイプされるコマンド(文字 C<|> で始まるもの)の出力に
14701595使われるプログラム。
14711596デフォルトでは、C<$ENV{PAGER}> が使われます。
14721597デバッガは強調と下線に関して現在の端末設定を使うので、もし選択した
14731598ページャがエスケープシーケンスを変更せずに通過させられない場合、
14741599一部のデバッガコマンドの出力は、ページャに送られると読めなくなるでしょう。
14751600
14761601=item C<tkRunning>
14771602X<debugger option, tkRunning>
14781603
14791604=begin original
14801605
14811606Run Tk while prompting (with ReadLine).
14821607
14831608=end original
14841609
14851610プロンプトで (ReadLine と共に) Tk を実行します。
14861611
14871612=item C<signalLevel>, C<warnLevel>, C<dieLevel>
14881613X<debugger option, signalLevel> X<debugger option, warnLevel>
14891614X<debugger option, dieLevel>
14901615
14911616=begin original
14921617
14931618Level of verbosity. By default, the debugger leaves your exceptions
14941619and warnings alone, because altering them can break correctly running
14951620programs. It will attempt to print a message when uncaught INT, BUS, or
1496SEGV signals arrive. (But see the mention of signals in L<BUGS> below.)
1621SEGV signals arrive. (But see the mention of signals in L</BUGS> below.)
14971622
14981623=end original
14991624
15001625詳細さのレベル。
15011626デフォルトでは、デバッガは例外と警告を放っておきます;
15021627これを変更すると、プログラムが正しく動かなくなることがあるからです。
15031628捕捉されていない INT, BUS, SEGV シグナルがあると、メッセージを
15041629表示しようとします。
15051630(しかし、以下の L<BUGS> のシグナルに関する注意を参照してください。)
15061631
15071632=begin original
15081633
15091634To disable this default safe mode, set these values to something higher
15101635than 0. At a level of 1, you get backtraces upon receiving any kind
15111636of warning (this is often annoying) or exception (this is
15121637often valuable). Unfortunately, the debugger cannot discern fatal
15131638exceptions from non-fatal ones. If C<dieLevel> is even 1, then your
15141639non-fatal exceptions are also traced and unceremoniously altered if they
15151640came from C<eval'ed> strings or from any kind of C<eval> within modules
15161641you're attempting to load. If C<dieLevel> is 2, the debugger doesn't
15171642care where they came from: It usurps your exception handler and prints
15181643out a trace, then modifies all exceptions with its own embellishments.
15191644This may perhaps be useful for some tracing purposes, but tends to hopelessly
15201645destroy any program that takes its exception handling seriously.
15211646
15221647=end original
15231648
15241649このデフォルトのセーフモードを無効にするには、これらの値を 0 以上に
15251650セットしてください。
15261651レベル 1 では、あらゆる種類の警告(これはしばしばうんざりさせるものです)や
15271652例外(これはしばしば価値があります)を受信した時にバックトレースを得ます。
15281653残念ながら、デバッガは致命的な例外と致命的でない例外を識別できません。
15291654C<dieLevel> は 1 であっても、致命的でない例外もトレースされ、
15301655それが C<eval された> 文字列からか、読み込もうとしたモジュール内の
15311656あらゆる種類の C<eval> からのものであるなら、突然置き換えられます。
15321657C<dieLevel> が 2 なら、デバッガは例外の出所を気にしません:
15331658例外ハンドラを横取りしてトレースを表示し、それから全ての例外を自身の装飾で
15341659修正します。
15351660これはある種のトレースの目的にはおそらく有用ですが、
15361661例外をまじめに扱っているプログラムをどうしようもなく破壊してしまう傾向が
15371662あります。
15381663
15391664=item C<AutoTrace>
15401665X<debugger option, AutoTrace>
15411666
15421667=begin original
15431668
15441669Trace mode (similar to C<t> command, but can be put into
15451670C<PERLDB_OPTS>).
15461671
15471672=end original
15481673
15491674トレースモード(C<t> コマンドと同様ですが、C<PERLDB_OPTS> に書けます)。
15501675
15511676=item C<LineInfo>
15521677X<debugger option, LineInfo>
15531678
15541679=begin original
15551680
15561681File or pipe to print line number info to. If it is a pipe (say,
15571682C<|visual_perl_db>), then a short message is used. This is the
15581683mechanism used to interact with a slave editor or visual debugger,
15591684such as the special C<vi> or C<emacs> hooks, or the C<ddd> graphical
15601685debugger.
15611686
15621687=end original
15631688
15641689行番号情報を記録するファイルまたはパイプ。
15651690これが (C<|visual_perl_db> のように) パイプの場合、短い文章が使われます。
15661691これは、特別な C<vi> や C<emacs> のフックや、C<ddd> グラフィカル
15671692デバッガのようなスレーブエディタやビジュアルデバッガと相互作用するために
15681693使われる機構です。
15691694
15701695=item C<inhibit_exit>
15711696X<debugger option, inhibit_exit>
15721697
15731698=begin original
15741699
15751700If 0, allows I<stepping off> the end of the script.
15761701
15771702=end original
15781703
157917040 だと、スクリプトの最後で I<プログラムを終了する> ことを認めます。
15801705
15811706=item C<PrintRet>
15821707X<debugger option, PrintRet>
15831708
15841709=begin original
15851710
15861711Print return value after C<r> command if set (default).
15871712
15881713=end original
15891714
15901715設定されると(デフォルト)、C<r> コマンドの後に返り値を表示します。
15911716
15921717=item C<ornaments>
15931718X<debugger option, ornaments>
15941719
15951720=begin original
15961721
15971722Affects screen appearance of the command line (see L<Term::ReadLine>).
15981723There is currently no way to disable these, which can render
15991724some output illegible on some displays, or with some pagers.
16001725This is considered a bug.
16011726
16021727=end original
16031728
16041729コマンドラインの画面への表示に影響を与えます(L<Term::ReadLine> を
16051730参照してください)。
16061731今のところ、これを無効にする方法はありません;
16071732これにより、ディスプレイやページャーによっては判読できない出力を
16081733行うことがあります。
16091734これはバグと考えられています。
16101735
16111736=item C<frame>
16121737X<debugger option, frame>
16131738
16141739=begin original
16151740
16161741Affects the printing of messages upon entry and exit from subroutines. If
16171742C<frame & 2> is false, messages are printed on entry only. (Printing
16181743on exit might be useful if interspersed with other messages.)
16191744
16201745=end original
16211746
16221747サブルーチンへの出入り時のメッセージ表示に影響を与えます。
16231748C<frame & 2> が偽なら、サブルーチンに入る時にのみメッセージを出力します。
16241749(出るときのメッセージは、他のメッセージがまき散らされているときには
16251750有用でしょう。)
16261751
16271752=begin original
16281753
16291754If C<frame & 4>, arguments to functions are printed, plus context
16301755and caller info. If C<frame & 8>, overloaded C<stringify> and
16311756C<tie>d C<FETCH> is enabled on the printed arguments. If C<frame
16321757& 16>, the return value from the subroutine is printed.
16331758
16341759=end original
16351760
16361761C<frame & 4> の場合、関数の引数に加えて、コンテキストと呼び出し元の
16371762情報を表示します。
16381763C<frame & 8> の場合、引数の表示にオーバーロードされた C<文字列化> と
16391764C<tie> した C<FETCH> が有効になります。
16401765C<frame & 16> の場合、サブルーチンからの返り値が表示されます。
16411766
16421767=begin original
16431768
16441769The length at which the argument list is truncated is governed by the
16451770next option:
16461771
16471772=end original
16481773
16491774引数リストが切り詰められた時の長さは次のオプションの管轄となります:
16501775
16511776=item C<maxTraceLen>
16521777X<debugger option, maxTraceLen>
16531778
16541779=begin original
16551780
16561781Length to truncate the argument list when the C<frame> option's
16571782bit 4 is set.
16581783
16591784=end original
16601785
16611786C<frame> オプションの bit 4 がセットされている時の引数リストを切り詰める
16621787長さ。
16631788
16641789=item C<windowSize>
16651790X<debugger option, windowSize>
16661791
16671792=begin original
16681793
16691794Change the size of code list window (default is 10 lines).
16701795
16711796=end original
16721797
16731798コードリストウィンドウの大きさを変更します(デフォルトは 10 行です)。
16741799
16751800=back
16761801
16771802=begin original
16781803
16791804The following options affect what happens with C<V>, C<X>, and C<x>
16801805commands:
16811806
16821807=end original
16831808
16841809以下のオプションは C<V>, C<X>, C<x> コマンドに影響を与えます。
16851810
16861811=over 12
16871812
16881813=item C<arrayDepth>, C<hashDepth>
16891814X<debugger option, arrayDepth> X<debugger option, hashDepth>
16901815
16911816=begin original
16921817
16931818Print only first N elements ('' for all).
16941819
16951820=end original
16961821
16971822最初の N 要素だけを表示します('' を指定すると全て表示します)。
16981823
16991824=item C<dumpDepth>
17001825X<debugger option, dumpDepth>
17011826
17021827=begin original
17031828
17041829Limit recursion depth to N levels when dumping structures.
17051830Negative values are interpreted as infinity. Default: infinity.
17061831
17071832=end original
17081833
17091834構造をダンプするときに再帰の深さを N レベルに制限します。
17101835負数を指定すると無限として解釈されます。
17111836デフォルト: 無限。
17121837
17131838=item C<compactDump>, C<veryCompact>
17141839X<debugger option, compactDump> X<debugger option, veryCompact>
17151840
17161841=begin original
17171842
17181843Change the style of array and hash output. If C<compactDump>, short array
17191844may be printed on one line.
17201845
17211846=end original
17221847
17231848配列とハッシュの出力スタイルを変更します。
17241849C<compactDump> の場合は、短い配列は 1 行で表示します。
17251850
17261851=item C<globPrint>
17271852X<debugger option, globPrint>
17281853
17291854=begin original
17301855
17311856Whether to print contents of globs.
17321857
17331858=end original
17341859
17351860グロブの内容を表示するかどうかです。
17361861
17371862=item C<DumpDBFiles>
17381863X<debugger option, DumpDBFiles>
17391864
17401865=begin original
17411866
17421867Dump arrays holding debugged files.
17431868
17441869=end original
17451870
17461871デバッグしていているファイルが保持している配列をダンプします。
17471872
17481873=item C<DumpPackages>
17491874X<debugger option, DumpPackages>
17501875
17511876=begin original
17521877
17531878Dump symbol tables of packages.
17541879
17551880=end original
17561881
17571882パッケージのシンボルテーブルをダンプします。
17581883
17591884=item C<DumpReused>
17601885X<debugger option, DumpReused>
17611886
17621887=begin original
17631888
17641889Dump contents of "reused" addresses.
17651890
17661891=end original
17671892
17681893「再利用された」アドレスの内容をダンプします。
17691894
17701895=item C<quote>, C<HighBit>, C<undefPrint>
17711896X<debugger option, quote> X<debugger option, HighBit>
17721897X<debugger option, undefPrint>
17731898
17741899=begin original
17751900
17761901Change the style of string dump. The default value for C<quote>
17771902is C<auto>; one can enable double-quotish or single-quotish format
17781903by setting it to C<"> or C<'>, respectively. By default, characters
17791904with their high bit set are printed verbatim.
17801905
17811906=end original
17821907
17831908文字列ダンプのスタイルを変更します。
17841909C<quote> のデフォルトは C<auto> です;
17851910C<"> や C<'> にセットすることでダブルクォート風やシングルクォート風に
17861911できます。
17871912デフォルトでは、最上位ビットがセットされている文字はそのまま表示されます。
17881913
17891914=item C<UsageOnly>
17901915X<debugger option, UsageOnly>
17911916
17921917=begin original
17931918
17941919Rudimentary per-package memory usage dump. Calculates total
17951920size of strings found in variables in the package. This does not
17961921include lexicals in a module's file scope, or lost in closures.
17971922
17981923=end original
17991924
18001925基本的なパッケージ単位のメモリ使用量ダンプ。
18011926パッケージ内の変数で見つかった文字列のサイズの合計を計算します。
18021927モジュールのファイルスコープ内のレキシカルや、クロージャ内で
18031928失われたものは含まれません。
18041929
1930=item C<HistFile>
1931X<debugger option, history, HistFile>
1932
1933=begin original
1934
1935The path of the file from which the history (assuming a usable
1936Term::ReadLine backend) will be read on the debugger's startup, and to which
1937it will be saved on shutdown (for persistence across sessions). Similar in
1938concept to Bash's C<.bash_history> file.
1939
1940=end original
1941
1942デバッガの起動時に読み込まれ、(セッションをまたいで永続させるために)終了時に
1943保管されるヒストリ (Term::ReadLine バックエンドが利用可能であることを
1944仮定しています) のファイルのパス。
1945Bash の C<.bash_history> ファイルと同じ考え方です。
1946
1947=item C<HistSize>
1948X<debugger option, history, HistSize>
1949
1950=begin original
1951
1952The count of the saved lines in the history (assuming C<HistFile> above).
1953
1954=end original
1955
1956ヒストリに保管される行数 (上述の C<HistFile> を仮定します)。
1957
18051958=back
18061959
18071960=begin original
18081961
18091962After the rc file is read, the debugger reads the C<$ENV{PERLDB_OPTS}>
18101963environment variable and parses this as the remainder of a "O ..."
18111964line as one might enter at the debugger prompt. You may place the
18121965initialization options C<TTY>, C<noTTY>, C<ReadLine>, and C<NonStop>
18131966there.
18141967
18151968=end original
18161969
18171970rc ファイルが読み込まれた後、デバッガは C<$ENV{PERLDB_OPTS}> 環境変数を
18181971読み込み、デバッガのプロンプトから "O ..." として入力されたかのように
18191972パースします。
18201973初期化オプション C<TTY>, C<noTTY>, C<ReadLine>, C<NonStop> も
18211974ここで設定できます。
18221975
18231976=begin original
18241977
18251978If your rc file contains:
18261979
18271980=end original
18281981
18291982rc ファイルに以下のように書くと:
18301983
18311984 parse_options("NonStop=1 LineInfo=db.out AutoTrace");
18321985
18331986=begin original
18341987
18351988then your script will run without human intervention, putting trace
18361989information into the file I<db.out>. (If you interrupt it, you'd
18371990better reset C<LineInfo> to F</dev/tty> if you expect to see anything.)
18381991
18391992=end original
18401993
18411994スクリプトは人間の介入なしに実行され、トレース情報を
18421995I<db.out> ファイルに出力します。
18431996(中断して、何も表示されない場合は、C<LineInfo> を F</dev/tty> に
18441997リセットしたほうがよいでしょう。)
18451998
18461999=over 12
18472000
18482001=item C<TTY>
18492002X<debugger option, TTY>
18502003
18512004=begin original
18522005
18532006The TTY to use for debugging I/O.
18542007
18552008=end original
18562009
18572010デバッグ I/O として TTY を使います。
18582011
18592012=item C<noTTY>
18602013X<debugger option, noTTY>
18612014
18622015=begin original
18632016
18642017If set, the debugger goes into C<NonStop> mode and will not connect to a TTY. If
18652018interrupted (or if control goes to the debugger via explicit setting of
18662019$DB::signal or $DB::single from the Perl script), it connects to a TTY
18672020specified in the C<TTY> option at startup, or to a tty found at
18682021runtime using the C<Term::Rendezvous> module of your choice.
18692022
18702023=end original
18712024
18722025セットすると、デバッガは C<NonStop> モードとなり、TTY と接続されません。
18732026もし中断された(または Perl スクリプトから明示的に $DB::signal や
18742027$DB::single をセットすることによってデバッガに制御が移った)場合、
18752028起動時に C<TTY> オプションで指定された TTY か、実行時に C<Term::Rendezvous>
18762029モジュールで選択された TTY に接続されます。
18772030
18782031=begin original
18792032
18802033This module should implement a method named C<new> that returns an object
18812034with two methods: C<IN> and C<OUT>. These should return filehandles to use
18822035for debugging input and output correspondingly. The C<new> method should
18832036inspect an argument containing the value of C<$ENV{PERLDB_NOTTY}> at
18842037startup, or C<"$ENV{HOME}/.perldbtty$$"> otherwise. This file is not
18852038inspected for proper ownership, so security hazards are theoretically
18862039possible.
18872040
18882041=end original
18892042
18902043このモジュールは、2 つのメソッド C<IN> と C<OUT> をもつオブジェクトを
18912044返すメソッド C<new> を実装する必要があります。
18922045これらはそれぞれ、デバッグ入力と出力のためのファイルハンドルを
18932046返すようにします。
18942047C<new> メソッドは起動時に C<$ENV{PERLDB_NOTTY}> の値を含んでいる
18952048引数を検査し、さもなければ C<"$ENV{HOME}/.perldbtty$$"> となります。
18962049このファイルは適切な所有権について検査されないので、
18972050理論的にはセキュリティの問題が起こり得ます。
18982051
18992052=item C<ReadLine>
19002053X<debugger option, ReadLine>
19012054
19022055=begin original
19032056
19042057If false, readline support in the debugger is disabled in order
19052058to debug applications that themselves use ReadLine.
19062059
19072060=end original
19082061
19092062偽だと、デバッグするアプリケーション自身が ReadLine を使うために、
19102063readline 対応を無効にします。
19112064
19122065=item C<NonStop>
19132066X<debugger option, NonStop>
19142067
19152068=begin original
19162069
19172070If set, the debugger goes into non-interactive mode until interrupted, or
19182071programmatically by setting $DB::signal or $DB::single.
19192072
19202073=end original
19212074
19222075設定されると、デバッガは中断されるか、プログラム的に $DB::signal か
19232076$DB::single に設定されるまで、非対話的モードとなります。
19242077
19252078=back
19262079
19272080=begin original
19282081
19292082Here's an example of using the C<$ENV{PERLDB_OPTS}> variable:
19302083
19312084=end original
19322085
19332086以下に C<$ENV{PERLDB_OPTS}> 変数を使った例を示します:
19342087
19352088 $ PERLDB_OPTS="NonStop frame=2" perl -d myprogram
19362089
19372090=begin original
19382091
19392092That will run the script B<myprogram> without human intervention,
19402093printing out the call tree with entry and exit points. Note that
19412094C<NonStop=1 frame=2> is equivalent to C<N f=2>, and that originally,
19422095options could be uniquely abbreviated by the first letter (modulo
19432096the C<Dump*> options). It is nevertheless recommended that you
19442097always spell them out in full for legibility and future compatibility.
19452098
19462099=end original
19472100
19482101これは、人間の関与なしでスクリプト B<myprogram> を実行し、進入と終了の
19492102ポイントの呼び出し木を表示します。
19502103C<NonStop=1 frame=2> は C<N f=2> と等価で、もともとオプションは最初の文字
19512104(C<Dump*> オプションを法として) に省略できます。
19522105それでもやはり、読みやすさと将来の互換性のために、常にフルスペルを書くことが
19532106推奨されます。
19542107
19552108=begin original
19562109
19572110Other examples include
19582111
19592112=end original
19602113
19612114もう一つの例としては:
19622115
19632116 $ PERLDB_OPTS="NonStop LineInfo=listing frame=2" perl -d myprogram
19642117
19652118=begin original
19662119
19672120which runs script non-interactively, printing info on each entry
19682121into a subroutine and each executed line into the file named F<listing>.
19692122(If you interrupt it, you would better reset C<LineInfo> to something
19702123"interactive"!)
19712124
19722125=end original
19732126
19742127とするとスクリプトは非対話的に実行され、サブルーチンへの進入と実行行を
19752128F<listing> という名前のファイルに記録します。
19762129(中断すると、何か「対話的」にするために C<LineInfo> をリセットする方が
19772130良いでしょう!)
19782131
19792132=begin original
19802133
19812134Other examples include (using standard shell syntax to show environment
19822135variable settings):
19832136
19842137=end original
19852138
19862139(環境変数設定を表示する標準シェル構文を使った)もう一つの例としては:
19872140
19882141 $ ( PERLDB_OPTS="NonStop frame=1 AutoTrace LineInfo=tperl.out"
19892142 perl -d myprogram )
19902143
19912144=begin original
19922145
19932146which may be useful for debugging a program that uses C<Term::ReadLine>
19942147itself. Do not forget to detach your shell from the TTY in the window that
19952148corresponds to F</dev/ttyXX>, say, by issuing a command like
19962149
19972150=end original
19982151
19992152これは C<Term::ReadLine> 地震を使っているプログラムをデバッグするのに
20002153便利です。
20012154以下のようなコマンドを使って、使用中のシェルを、F</dev/ttyXX> に対応する
20022155ウィンドウの TTY からデタッチすることを忘れないで下さい:
20032156
20042157 $ sleep 1000000
20052158
20062159=begin original
20072160
20082161See L<perldebguts/"Debugger Internals"> for details.
20092162
20102163=end original
20112164
20122165詳細については L<perldebguts/"Debugger Internals"> を参照してください。
20132166
2014=head2 Debugger input/output
2167=head2 Debugger Input/Output
20152168
20162169(デバッガの入出力)
20172170
20182171=over 8
20192172
20202173=item Prompt
20212174
20222175=begin original
20232176
20242177The debugger prompt is something like
20252178
20262179=end original
20272180
20282181デバッガのプロンプトは以下のようだったり:
20292182
20302183 DB<8>
20312184
20322185=begin original
20332186
20342187or even
20352188
20362189=end original
20372190
20382191あるいは以下のようだったりします:
20392192
20402193 DB<<17>>
20412194
20422195=begin original
20432196
20442197where that number is the command number, and which you'd use to
20452198access with the built-in B<csh>-like history mechanism. For example,
20462199C<!17> would repeat command number 17. The depth of the angle
20472200brackets indicates the nesting depth of the debugger. You could
20482201get more than one set of brackets, for example, if you'd already
20492202at a breakpoint and then printed the result of a function call that
20502203itself has a breakpoint, or you step into an expression via C<s/n/t
20512204expression> command.
20522205
20532206=end original
20542207
20552208ここで数値はコマンド番号で、組み込みの B<csh> 風履歴機構を使って
20562209アクセスするのに使います。
20572210例えば、C<!17> はコマンド番号 17 を再実行します。
20582211不等号の深さはデバッガのネストの深さを示します。
20592212例えば、既にブレークポイントにいて、それ自身にもブレークポイントを
20602213含む関数呼び出しの結果を表示させたり、C<s/n/t expression> コマンドを
20612214使って式をステップ実行したりした時に複数の不等号の組を見ることがあります。
20622215
20632216=item Multiline commands
20642217
20652218=begin original
20662219
20672220If you want to enter a multi-line command, such as a subroutine
20682221definition with several statements or a format, escape the newline
20692222that would normally end the debugger command with a backslash.
20702223Here's an example:
20712224
20722225=end original
20732226
20742227複数の文からなるサブルーチン定義やフォーマットといった、複数行の
20752228コマンドを入力したい場合は、通常はデバッガコマンドを終了させる改行を
20762229バックスラッシュでエスケープしてください。
20772230以下は例です:
20782231
20792232 DB<1> for (1..4) { \
20802233 cont: print "ok\n"; \
20812234 cont: }
20822235 ok
20832236 ok
20842237 ok
20852238 ok
20862239
20872240=begin original
20882241
20892242Note that this business of escaping a newline is specific to interactive
20902243commands typed into the debugger.
20912244
20922245=end original
20932246
20942247この、改行をエスケープする問題は、対話的にデバッガに入力されたコマンドに
20952248特有であることに注意してください。
20962249
20972250=item Stack backtrace
20982251X<backtrace> X<stack, backtrace>
20992252
21002253=begin original
21012254
21022255Here's an example of what a stack backtrace via C<T> command might
21032256look like:
21042257
21052258=end original
21062259
21072260これは、C<T> コマンドによって表示されるスタックバックトレースの
21082261例です:
21092262
2110 $ = main::infested called from file `Ambulation.pm' line 10
2263 $ = main::infested called from file 'Ambulation.pm' line 10
2111 @ = Ambulation::legs(1, 2, 3, 4) called from file `camel_flea' line 7
2264 @ = Ambulation::legs(1, 2, 3, 4) called from file 'camel_flea'
2112 $ = main::pests('bactrian', 4) called from file `camel_flea' line 4
2265 line 7
2266 $ = main::pests('bactrian', 4) called from file 'camel_flea'
2267 line 4
21132268
21142269=begin original
21152270
21162271The left-hand character up there indicates the context in which the
21172272function was called, with C<$> and C<@> meaning scalar or list
21182273contexts respectively, and C<.> meaning void context (which is
21192274actually a sort of scalar context). The display above says
21202275that you were in the function C<main::infested> when you ran the
21212276stack dump, and that it was called in scalar context from line
2122227710 of the file I<Ambulation.pm>, but without any arguments at all,
21232278meaning it was called as C<&infested>. The next stack frame shows
21242279that the function C<Ambulation::legs> was called in list context
21252280from the I<camel_flea> file with four arguments. The last stack
21262281frame shows that C<main::pests> was called in scalar context,
21272282also from I<camel_flea>, but from line 4.
21282283
21292284=end original
21302285
21312286上記の左側の文字は関数が呼び出されたコンテキストを示しています;
21322287C<$> と C<@> はそれぞれスカラコンテキストとリストコンテキストを意味し、
21332288C<.> は無効コンテキスト(実際のところはスカラコンテキストのようなもの)を
21342289意味します。
21352290上記の表示は、スタックダンプを実行したときに C<main::infested> にいて、
21362291これはファイル I<Ambulation.pm> の 10 行目から、スカラコンテキストで
21372292引数なしで呼び出されています; つまり C<&infested> のようにして
21382293呼び出されています。
21392294次のスタックフレームは、関数 C<Ambulation::legs> が I<camel_flea> から
21402295リストコンテキストで 4 つの引数と共に呼び出されています。
21412296最後のスタックフレームは、C<main::pests> が、同じファイル I<camel_flea> の
214222974 行目からスカラコンテキストで呼び出されています。
21432298
21442299=begin original
21452300
21462301If you execute the C<T> command from inside an active C<use>
21472302statement, the backtrace will contain both a C<require> frame and
2148an C<eval>) frame.
2303an C<eval> frame.
21492304
21502305=end original
21512306
21522307有効な C<use> 文の中から C<T> コマンドを実行すると、バックとレースには
21532308C<require> フレームと C<eval> フレームの両方が含まれます。
21542309
21552310=item Line Listing Format
21562311
21572312=begin original
21582313
21592314This shows the sorts of output the C<l> command can produce:
21602315
21612316=end original
21622317
21632318これは C<l> コマンドの出力を示しています:
21642319
2165 DB<<13>> l
2320 DB<<13>> l
2166 101: @i{@i} = ();
2321 101: @i{@i} = ();
2167 102:b @isa{@i,$pack} = ()
2322 102:b @isa{@i,$pack} = ()
2168 103 if(exists $i{$prevpack} || exists $isa{$pack});
2323 103 if(exists $i{$prevpack} || exists $isa{$pack});
2169 104 }
2324 104 }
2170 105
2325 105
2171 106 next
2326 106 next
2172 107==> if(exists $isa{$pack});
2327 107==> if(exists $isa{$pack});
2173 108
2328 108
2174 109:a if ($extra-- > 0) {
2329 109:a if ($extra-- > 0) {
2175 110: %isa = ($pack,1);
2330 110: %isa = ($pack,1);
21762331
21772332=begin original
21782333
21792334Breakable lines are marked with C<:>. Lines with breakpoints are
21802335marked by C<b> and those with actions by C<a>. The line that's
21812336about to be executed is marked by C<< ==> >>.
21822337
21832338=end original
21842339
21852340ブレーク可能な行には C<:> が付いています。
21862341ブレークポイントのある行には C<b> が、アクションがある行には
21872342C<a> があります。
21882343今から実行しようとしている行には C<< ==> >> が付いています。
21892344
21902345=begin original
21912346
21922347Please be aware that code in debugger listings may not look the same
21932348as your original source code. Line directives and external source
21942349filters can alter the code before Perl sees it, causing code to move
21952350from its original positions or take on entirely different forms.
21962351
21972352=end original
21982353
21992354デバッガで表示されるコードは、元のソースコードと同じように見えるとは
22002355限らないことに注意してください。
22012356行指示子と外部ソースフィルタが、Perl がコードを見る前にコードを
22022357変更することがあり、それによってコードが元の位置から移動したり、
22032358完全に異なる形になったりします。
22042359
22052360=item Frame listing
22062361
22072362=begin original
22082363
22092364When the C<frame> option is set, the debugger would print entered (and
22102365optionally exited) subroutines in different styles. See L<perldebguts>
22112366for incredibly long examples of these.
22122367
22132368=end original
22142369
22152370C<frame> オプションが設定されると、デバッガはサブルーチンに入ったとき
22162371(および出たときもオプションで)違ったスタイルで表示します。
22172372これらの非常に長い例については L<perldebguts> を参照してください。
22182373
22192374=back
22202375
2221=head2 Debugging compile-time statements
2376=head2 Debugging Compile-Time Statements
22222377
22232378(コンパイル時に実行される文のデバッグ)
22242379
22252380=begin original
22262381
22272382If you have compile-time executable statements (such as code within
22282383BEGIN, UNITCHECK and CHECK blocks or C<use> statements), these will
22292384I<not> be stopped by debugger, although C<require>s and INIT blocks
2230will, and compile-time statements can be traced with C<AutoTrace>
2385will, and compile-time statements can be traced with the C<AutoTrace>
22312386option set in C<PERLDB_OPTS>). From your own Perl code, however, you
22322387can transfer control back to the debugger using the following
22332388statement, which is harmless if the debugger is not running:
22342389
22352390=end original
22362391
22372392コンパイル時に実行される文 (BEGIN, UNITCHECK, CHECK のブロック内のコードや
2238C<use> 文) があれば、それらはデバッガによってI<止めることができま
2393C<use> 文) があれば、それらはデバッガによってI<止めることができません>;
2239せん>。C<require> と INIT ブロックは可能です
2394C<require> と INIT ブロックは可能です; また、コンパイル時実行文は
2240また、コンパイル時実行文は C<PERLDB_OPTS> で C<AutoTrace> オプションを
2395C<PERLDB_OPTS> で C<AutoTrace> オプションを設定することでトレースできます。
2241設定することでトレースできます。
22422396しかし、以下のような文を自分で Perl コードに含めれば、
2243デバッガに制御を渡すことができます
2397デバッガに制御を渡すことができます; この文は、デバッガを
2244この文は、デバッガを起動していないときには、何もしません:
2398起動していないときには、何もしません:
22452399
22462400 $DB::single = 1;
22472401
22482402=begin original
22492403
22502404If you set C<$DB::single> to 2, it's equivalent to having
22512405just typed the C<n> command, whereas a value of 1 means the C<s>
22522406command. The C<$DB::trace> variable should be set to 1 to simulate
22532407having typed the C<t> command.
22542408
22552409=end original
22562410
22572411C<$DB::single> に 2 をセットすると、C<n>コマンドをタイプしたのと
2258等価になります。
2412等価になります; 1 を設定すると C<s> コマンドとなります
22591 を設定すると C<s> コマンドとなります。
22602413C<$DB::trace> 変数は C<t> コマンドをタイプした状態をシミュレートするために
226124141 にセットするべきです。
22622415
22632416=begin original
22642417
22652418Another way to debug compile-time code is to start the debugger, set a
22662419breakpoint on the I<load> of some module:
22672420
22682421=end original
22692422
22702423コンパイル時に実行されるコードをデバッグするもう一つの方法は、
22712424モジュールの I<load> にブレークポイントを設定して:
22722425
22732426 DB<7> b load f:/perllib/lib/Carp.pm
2274 Will stop on load of `f:/perllib/lib/Carp.pm'.
2427 Will stop on load of 'f:/perllib/lib/Carp.pm'.
22752428
22762429=begin original
22772430
22782431and then restart the debugger using the C<R> command (if possible). One can use C<b
22792432compile subname> for the same purpose.
22802433
22812434=end original
22822435
22832436(可能なら) C<R> コマンドを使ってデバッガを再起動することです。
22842437C<b compile subname> も同じ目的に使えます。
22852438
22862439=head2 Debugger Customization
22872440
22882441(デバッガのカスタマイズ)
22892442
22902443=begin original
22912444
22922445The debugger probably contains enough configuration hooks that you
22932446won't ever have to modify it yourself. You may change the behaviour
2294of debugger from within the debugger using its C<o> command, from
2447of the debugger from within the debugger using its C<o> command, from
22952448the command line via the C<PERLDB_OPTS> environment variable, and
22962449from customization files.
22972450
22982451=end original
22992452
23002453デバッガにはおそらくあなたが自分で修正する必要があるとは思わないような
23012454ところまで含んだ設定フックがあります。
23022455デバッガの振る舞いは、デバッガ内で C<o> コマンドを使って変更できます;
23032456これは C<PERLDB_OPT> 環境変数経由でコマンドラインからか、設定ファイルから
23042457変更できます。
23052458
23062459=begin original
23072460
23082461You can do some customization by setting up a F<.perldb> file, which
23092462contains initialization code. For instance, you could make aliases
23102463like these (the last one is one people expect to be there):
23112464
23122465=end original
23132466
23142467初期化コードを入れたファイル .perldb を設定することでも、
23152468いくらかのカスタマイズができます。
23162469たとえば、以下のようなエイリアスが行えます (最後のものは、
23172470人々があると思っているものです):
23182471
23192472 $DB::alias{'len'} = 's/^len(.*)/p length($1)/';
23202473 $DB::alias{'stop'} = 's/^stop (at|in)/b/';
23212474 $DB::alias{'ps'} = 's/^ps\b/p scalar /';
23222475 $DB::alias{'quit'} = 's/^quit(\s*)/exit/';
23232476
23242477=begin original
23252478
23262479You can change options from F<.perldb> by using calls like this one;
23272480
23282481=end original
23292482
23302483F<.perldb> のオプションを、以下のような呼び出しによって変更できます:
23312484
23322485 parse_options("NonStop=1 LineInfo=db.out AutoTrace=1 frame=2");
23332486
23342487=begin original
23352488
23362489The code is executed in the package C<DB>. Note that F<.perldb> is
23372490processed before processing C<PERLDB_OPTS>. If F<.perldb> defines the
23382491subroutine C<afterinit>, that function is called after debugger
23392492initialization ends. F<.perldb> may be contained in the current
23402493directory, or in the home directory. Because this file is sourced
23412494in by Perl and may contain arbitrary commands, for security reasons,
23422495it must be owned by the superuser or the current user, and writable
23432496by no one but its owner.
23442497
23452498=end original
23462499
23472500コードは C<DB> パッケージで実行されます。
23482501F<.perldb> は C<PERLDB_OPTS> の前に処理されることに注意してください。
23492502F<.perldb> で C<afterinit> サブルーチンが定義されていると、この関数は
23502503デバッガの初期化終了後に呼び出されます。
23512504F<.perldb> はカレントディレクトリかホームディレクトリに置くことができます。
23522505このファイルは Perl によって実行され、任意のコマンドを含めることが
23532506できるので、セキュリティ上の理由から、スーパーユーザーが現在のユーザーに
23542507よって所有され、所有者以外には書込み禁止になっていなければなりません。
23552508
23562509=begin original
23572510
23582511You can mock TTY input to debugger by adding arbitrary commands to
23592512@DB::typeahead. For example, your F<.perldb> file might contain:
23602513
23612514=end original
23622515
23632516@DB::typeahead に任意のコマンドを追加することで、デバッガへの TTY 入力を
23642517模倣できます。
23652518例えば、あなたの F<.perldb> ファイルに以下のように書くと:
23662519
23672520 sub afterinit { push @DB::typeahead, "b 4", "b 6"; }
23682521
23692522=begin original
23702523
23712524Which would attempt to set breakpoints on lines 4 and 6 immediately
23722525after debugger initialization. Note that @DB::typeahead is not a supported
23732526interface and is subject to change in future releases.
23742527
23752528=end original
23762529
23772530デバッガ初期化の直後に 4 行目と 6 行目にブレークポイントを
23782531設定しようとします。
23792532@DB::typeahead はサポートしているインターフェースではなく、将来の
23802533リリースでは変更されることがあることに注意してください。
23812534
23822535=begin original
23832536
23842537If you want to modify the debugger, copy F<perl5db.pl> from the
23852538Perl library to another name and hack it to your heart's content.
23862539You'll then want to set your C<PERL5DB> environment variable to say
23872540something like this:
23882541
23892542=end original
23902543
23912544デバッガを変更したい場合には、perl5db.pl を Perl ライブラリから
23922545別の名前にコピーし、修正してください。それから
23932546環境変数 C<PERL5DB> には、以下のように設定する必要があるでしょう:
23942547
23952548 BEGIN { require "myperl5db.pl" }
23962549
23972550=begin original
23982551
23992552As a last resort, you could also use C<PERL5DB> to customize the debugger
24002553by directly setting internal variables or calling debugger functions.
24012554
24022555=end original
24032556
24042557最後の手段として、 C<PERL5DB> を、直接内部変数を設定したり
24052558デバッガ関数を呼び出すことでデバッガをカスタマイズすることもできます。
24062559
24072560=begin original
24082561
24092562Note that any variables and functions that are not documented in
24102563this document (or in L<perldebguts>) are considered for internal
24112564use only, and as such are subject to change without notice.
24122565
24132566=end original
24142567
24152568このドキュメント(や L<perldebguts>)に記述されていない変数や
24162569関数は内部使用専用として扱われ、予告なく変更されることがあります。
24172570
2418=head2 Readline Support
2571=head2 Readline Support / History in the Debugger
24192572
2420(readline 対応)
2573(readline 対応 / デバッガのヒストリ)
24212574
24222575=begin original
24232576
24242577As shipped, the only command-line history supplied is a simplistic one
24252578that checks for leading exclamation points. However, if you install
2426the Term::ReadKey and Term::ReadLine modules from CPAN, you will
2579the Term::ReadKey and Term::ReadLine modules from CPAN (such as
2427have full editing capabilities much like GNU I<readline>(3) provides.
2580Term::ReadLine::Gnu, Term::ReadLine::Perl, ...) you will
2581have full editing capabilities much like those GNU I<readline>(3) provides.
24282582Look for these in the F<modules/by-module/Term> directory on CPAN.
24292583These do not support normal B<vi> command-line editing, however.
24302584
24312585=end original
24322586
24332587出荷時の状態では、コマンドライン履歴参照機能として提供されるのは、
24342588エクスクラメーションマークを付けることによる単純なものだけです。
2435しかし、CPAN から Term::ReadKey Term::ReadLine のモジュールを
2589しかし、(Term::ReadLine::Gnu, Term::ReadLine::Perl, ... ように)
2590CPAN から Term::ReadKey と Term::ReadLine のモジュールを
24362591インストールすることで、GNU I<readline>(3) が提供するような
24372592完全な編集機能が使えるようになります。
24382593これらは CPAN の F<modules/by-module/Term> ディレクトリにあります。
24392594しかし、これらは通常の B<vi> コマンドライン編集は対応していません。
24402595
24412596=begin original
24422597
2443A rudimentary command-line completion is also available.
2598A rudimentary command-line completion is also available, including
2444Unfortunately, the names of lexical variables are not available for
2599lexical variables in the current scope if the C<PadWalker> module
2445completion.
2600is installed.
24462601
24472602=end original
24482603
2449基本的なコマンドライン補完も利可能です。
2604基本的なパッケージ単位のメモリ使量ダンプ; C<PadWalker> モジュールが
2450残念レキシカル変数名は補完できせん
2605インストールされているなら現在のスコープのレキシカル変数も含み
24512606
2607=begin original
2608
2609Without Readline support you may see the symbols "^[[A", "^[[C", "^[[B",
2610"^[[D"", "^H", ... when using the arrow keys and/or the backspace key.
2611
2612=end original
2613
2614Readline 対応なしでは、矢印キーやバックスペースキーを使うと
2615"^[[A", "^[[C", "^[[B", "^[[D"", "^H" のような表示を見るかもしれません。
2616
24522617=head2 Editor Support for Debugging
24532618
24542619(デバッグのためのエディタ対応)
24552620
24562621=begin original
24572622
2458If you have the FSF's version of B<emacs> installed on your system,
2623If you have the GNU's version of B<emacs> installed on your system,
24592624it can interact with the Perl debugger to provide an integrated
24602625software development environment reminiscent of its interactions
24612626with C debuggers.
24622627
24632628=end original
24642629
2465FSF 版の B<emacs> がシステムにインストールされている場合は、
2630GNU 版の B<emacs> がシステムにインストールされている場合は、
24662631C デバッガとの連携を連想させるような、Perl デバッガとの統合
24672632ソフトウェア開発環境を提供します。
24682633
24692634=begin original
24702635
2471Perl comes with a start file for making B<emacs> act like a
2636Recent versions of Emacs come with a
2637start file for making B<emacs> act like a
24722638syntax-directed editor that understands (some of) Perl's syntax.
2473Look in the I<emacs> directory of the Perl source distribution.
2639See L<perlfaq3>.
24742640
24752641=end original
24762642
2477Perl には B<emacs> を Perl の文法(の一部)を解釈する文法指向の
2643最近のバージョンの Emacs には B<emacs> を Perl の文法(の一部)を解釈する文法指向の
24782644エディタとして振舞わせるためのスタートファイルを同梱しています。
2479Perl ソース配布の I<emacs> ディレクトリを参照してください。
2645L<perlfaq3> を参照してください。
24802646
24812647=begin original
24822648
2483A similar setup by Tom Christiansen for interacting with any
2484vendor-shipped B<vi> and the X11 window system is also available.
2485This works similarly to the integrated multiwindow support that
2486B<emacs> provides, where the debugger drives the editor. At the
2487time of this writing, however, that tool's eventual location in the
2488Perl distribution was uncertain.
2489
2490=end original
2491
2492ベンダー同梱の B<vi> および X11 ウィンドウシステムと相互作用させるための
2493Tom Christiansen による似たようなセットアップも利用可能です。
2494これは B<emacs> が提供する統合マルチウィンドウサポートと同様に動作し、
2495デバッガがエディタを制御します。
2496しかし、これを記述している時点では、このツールの Perl 配布の中での
2497最終的な位置は不確定です。
2498
2499=begin original
2500
25012649Users of B<vi> should also look into B<vim> and B<gvim>, the mousey
25022650and windy version, for coloring of Perl keywords.
25032651
25042652=end original
25052653
25062654B<vi> ユーザーは、Perl のキーワードを色付けする、マウスとウィンドウ対応の
25072655B<vim> と B<gvim> を調べてみてください。
25082656
25092657=begin original
25102658
25112659Note that only perl can truly parse Perl, so all such CASE tools
25122660fall somewhat short of the mark, especially if you don't program
25132661your Perl as a C programmer might.
25142662
25152663=end original
25162664
25172665perl のみが完全に Perl をパースできるので、これら全ての CASE ツールには
25182666足りないところがあることに注意してください; 特に C プログラマーが書くような
25192667Perl プログラムを書いていない場合はそうです。
25202668
25212669=head2 The Perl Profiler
25222670X<profile> X<profiling> X<profiler>
25232671
25242672(Perl プロファイラ)
25252673
25262674=begin original
25272675
2528If you wish to supply an alternative debugger for Perl to run, just
2676If you wish to supply an alternative debugger for Perl to run,
25292677invoke your script with a colon and a package argument given to the
2530B<-d> flag. The most popular alternative debuggers for Perl is the
2678B<-d> flag. Perl's alternative debuggers include a Perl profiler,
2531Perl profiler. Devel::DProf is now included with the standard Perl
2679L<Devel::NYTProf>, which is available separately as a CPAN
25322680distribution. To profile your Perl program in the file F<mycode.pl>,
25332681just type:
25342682
25352683=end original
25362684
2537Perl の実行に代替デバッガを使いたい場合は、単に B<-d> オプションに
2685Perl の実行に代替デバッガを使いたい場合は、B<-d> オプションに
25382686コロンとパッケージからなる引数を付けてスクリプトを起動してください。
2539もっとも有名な Perl 用代替デバッガは Perl プロファイラです。
2687Perl 用代替デバッガは Perl プロファイラを含む
2540Devel::DProf Perl 標準配布に含まれいます。
2688L<Devel::DProf> で、CPAN 配布とし別に利用可能です。
25412689ファイル F<mycode.pl> にある Perl プログラムをプロファイリングしたい
25422690場合、以下のようにします:
25432691
2544 $ perl -d:DProf mycode.pl
2692 $ perl -d:NYTProf mycode.pl
25452693
25462694=begin original
25472695
2548When the script terminates the profiler will dump the profile
2696When the script terminates the profiler will create a database of the
2549information to a file called F<tmon.out>. A tool like B<dprofpp>,
2697profile information that you can turn into reports using the profiler's
2550also supplied with the standard Perl distribution, can be used to
2698tools. See <perlperf> for details.
2551interpret the information in that profile.
25522699
25532700=end original
25542701
2555スクリプトが終了すると、プロファイラはプロファイル情報
2702スクリプトが終了すると、プロファイラはプロファイラのツールを使ってレポートに
2556F<tmon.out> というファイルにダンプします。
2703変換出来るプロファイル情報のデータベースを作成します。
2557Perl 標準配布に含まれている B<dprofpp> のようなツールが、この
2704詳しくは L<perlperf> を参照してください。
2558プロファイルの情報を解釈するのに使えます。
25592705
2560=head1 Debugging regular expressions
2706=head1 Debugging Regular Expressions
25612707X<regular expression, debugging>
25622708X<regex, debugging> X<regexp, debugging>
25632709
25642710(正規表現のデバッグ)
25652711
25662712=begin original
25672713
25682714C<use re 'debug'> enables you to see the gory details of how the Perl
25692715regular expression engine works. In order to understand this typically
25702716voluminous output, one must not only have some idea about how regular
25712717expression matching works in general, but also know how Perl's regular
25722718expressions are internally compiled into an automaton. These matters
25732719are explored in some detail in
2574L<perldebguts/"Debugging regular expressions">.
2720L<perldebguts/"Debugging Regular Expressions">.
25752721
25762722=end original
25772723
25782724C<use re 'debug'> を指定すると、Perl 正規表現エンジンがどのように
25792725動作するかの詳細を見ることができます。
25802726この、典型的には大量の出力を理解するためには、
25812727一般的に正規表現マッチがどのように行われるかだけでなく、
25822728Perl の正規表現が内部的にどのようにオートマトンにコンパイルされるかを
25832729知らなければなりません。
25842730これらの事柄は詳細は
2585L<perldebguts/"Debugging regular expressions"> にあります。
2731L<perldebguts/"Debugging Regular Expressions"> にあります。
25862732
2587=head1 Debugging memory usage
2733=head1 Debugging Memory Usage
25882734X<memory usage>
25892735
25902736(メモリ使用のデバッグ)
25912737
25922738=begin original
25932739
25942740Perl contains internal support for reporting its own memory usage,
25952741but this is a fairly advanced concept that requires some understanding
25962742of how memory allocation works.
2597See L<perldebguts/"Debugging Perl memory usage"> for the details.
2743See L<perldebguts/"Debugging Perl Memory Usage"> for the details.
25982744
25992745=end original
26002746
2601Perl には自身のメモリ使用状況を報告するための内部機能があります
2747Perl には自身のメモリ使用状況を報告するための内部機能がありますが、
26022748しかしこれはかなり上級の概念で、メモリ割り当てがどのように行われるかに
26032749ついての理解が必要となります。
26042750詳細については
2605L<perldebguts/"Debugging Perl memory usage"> を参照して下さい。
2751L<perldebguts/"Debugging Perl Memory Usage"> を参照して下さい。
26062752
26072753=head1 SEE ALSO
26082754
26092755=begin original
26102756
2611You did try the B<-w> switch, didn't you?
2757You do have C<use strict> and C<use warnings> enabled, don't you?
26122758
26132759=end original
26142760
2615B<-w> スイッチもう使いましたよね?
2761C<use strict> と C<use warnings> は有効にしていまよね?
26162762
26172763=begin original
26182764
26192765L<perldebtut>,
26202766L<perldebguts>,
26212767L<re>,
26222768L<DB>,
2623L<Devel::DProf>,
2769L<Devel::NYTProf>,
2624L<dprofpp>,
26252770L<Dumpvalue>,
26262771and
26272772L<perlrun>.
26282773
26292774=end original
26302775
26312776L<perldebtut>,
26322777L<perldebguts>,
26332778L<re>,
26342779L<DB>,
26352780L<Devel::DProf>,
26362781L<dprofpp>,
26372782L<Dumpvalue>,
26382783L<perlrun>.
26392784
26402785=begin original
26412786
26422787When debugging a script that uses #! and is thus normally found in
26432788$PATH, the -S option causes perl to search $PATH for it, so you don't
26442789have to type the path or C<which $scriptname>.
26452790
26462791=end original
26472792
26482793#! を使っているので普通は $PATH に見つかるスクリプトをデバッグするとき、
26492794-S オプションを付けると perl は $PATH からスクリプトを探すので、
26502795パスや C<which $scriptname> をタイプする必要がなくなります。
26512796
26522797 $ perl -Sd foo.pl
26532798
26542799=head1 BUGS
26552800
26562801=begin original
26572802
26582803You cannot get stack frame information or in any fashion debug functions
26592804that were not compiled by Perl, such as those from C or C++ extensions.
26602805
26612806=end original
26622807
26632808C や C++ 拡張のような、Perl でコンパイルされていないものに対して
26642809スタックフレーム情報やあらゆるデバッグ関数を使うことはできません。
26652810
26662811=begin original
26672812
26682813If you alter your @_ arguments in a subroutine (such as with C<shift>
26692814or C<pop>), the stack backtrace will not show the original values.
26702815
26712816=end original
26722817
26732818サブルーチン内で(C<shift> や C<pop> を使って) @_ 引数を変更した場合、
26742819スタックバックトレースで元の値を表示することはできません。
26752820
26762821=begin original
26772822
26782823The debugger does not currently work in conjunction with the B<-W>
26792824command-line switch, because it itself is not free of warnings.
26802825
26812826=end original
26822827
2683デバッガは現在のところ B<-W> コマンドラインスイッチと同時に
2828デバッガは現在のところ B<-W> コマンドラインスイッチと同時に使うことは
2684使うことはできませんこれ自身が警告から逃れられないからです。
2829できません; これ自身が警告から逃れられないからです。
26852830
26862831=begin original
26872832
26882833If you're in a slow syscall (like C<wait>ing, C<accept>ing, or C<read>ing
26892834from your keyboard or a socket) and haven't set up your own C<$SIG{INT}>
26902835handler, then you won't be able to CTRL-C your way back to the debugger,
26912836because the debugger's own C<$SIG{INT}> handler doesn't understand that
26922837it needs to raise an exception to longjmp(3) out of slow syscalls.
26932838
26942839=end original
26952840
2696(キーボードやソケットからの C<wait>, C<accept>, C<read>などの)
2841(キーボードやソケットからの C<wait>, C<accept>, C<read>などの)遅い
2697遅いシステムコールを実行中で、独自の C<$SIG{INT}> ハンドラを設定していない場合、
2842システムコールを実行中で、独自の C<$SIG{INT}> ハンドラを設定していない場合、
2698デバッガに戻ってくるために CTRL-C を使うことはできません
2843デバッガに戻ってくるために CTRL-C を使うことはできません;
2699これは、デバッガ自身の C<$SIG{INT}> ハンドラが
2844これは、デバッガ自身の C<$SIG{INT}> ハンドラが遅いシステムコールから
2700遅いシステムコールから longjmp(3) で出るための例外を発生させる必要性を
2845longjmp(3) で出るための例外を発生させる必要性を理解しないからです。
2701理解しないからです。
27022846
27032847=begin meta
27042848
27052849Translate: 吉村 寿人 <JAE00534@niftyserve.or.jp> (5.000)
2706Update: Kentaro Shirakata <argrath@ub32.org> (5.6.1-)
2850Update: SHIRAKATA Kentaro <argrath@ub32.org> (5.6.1-)
2851Status: completed
27072852
27082853=end meta