jdk/src/linux/doc/man/ja/jdb.1
author mfang
Tue, 10 May 2011 12:31:42 -0700
changeset 9566 d7241af95355
parent 9352 cabba0c0f3ee
child 23600 d21826f6c789
permissions -rw-r--r--
7043580: integrate man page translation drop 2 into jdk7 Reviewed-by: yhuang
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9566
d7241af95355 7043580: integrate man page translation drop 2 into jdk7
mfang
parents: 9352
diff changeset
     1
." Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     2
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     3
."
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     4
." This code is free software; you can redistribute it and/or modify it
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     5
." under the terms of the GNU General Public License version 2 only, as
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     6
." published by the Free Software Foundation.
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     7
."
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     8
." This code is distributed in the hope that it will be useful, but WITHOUT
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     9
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    10
." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    11
." version 2 for more details (a copy is included in the LICENSE file that
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    12
." accompanied this code).
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    13
."
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    14
." You should have received a copy of the GNU General Public License version
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    15
." 2 along with this work; if not, write to the Free Software Foundation,
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    16
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    17
."
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2692
diff changeset
    18
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2692
diff changeset
    19
." or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2692
diff changeset
    20
." questions.
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    21
."
9566
d7241af95355 7043580: integrate man page translation drop 2 into jdk7
mfang
parents: 9352
diff changeset
    22
.TH jdb 1 "07 May 2011"
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    23
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    24
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    25
.SH "名前"
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    26
jdb \- Java デバッガ
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    27
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    28
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    29
\f3jdb\fP は、Java 言語プログラムのバグを見つけて修正するために使用するツールです。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    30
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    31
.SH "形式"
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    32
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    33
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    34
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    35
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    36
\fP\f3jdb\fP [ options ] [ class ] [ arguments ] 
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    37
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    38
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    39
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    40
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    41
.RS 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    42
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    43
options 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    44
次に示すコマンド行オプション 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    45
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    46
class 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    47
デバッグを開始するクラスの名前 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    48
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    49
arguments 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    50
class の \f2main()\fP メソッドに渡す \f2引数\fP 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    51
.RE
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    52
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    53
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    54
.SH " 説明"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    57
Java デバッガ \f3jdb\fP は、Java クラス用の簡単なコマンド行デバッガです。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
.na
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    59
\f2Java Platform Debugger Architecture\fP @
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    61
http://java.sun.com/javase/6/docs/technotes/guides/jpda/index.html を視覚的に実行し、ローカルまたはリモートの Java Virtual Machine の検査とデバッグを行うことができます。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    62
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    63
.SS 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    64
jdb セッションの開始
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    65
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    66
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    67
jdb セッションを開始するにはさまざまな方法があります。もっとも頻繁に使われるのは、デバッグするアプリケーションのメインクラスを使用して、\f3jdb\fP から新しい Java 仮想マシン (VM) を起動する方法です。コマンド行で、\f3java\fP の代わりに \f3jdb\fP コマンドを入力します。たとえば、アプリケーションのメインクラスが MyClass の場合は、JDB 環境でデバッグするときに次のコマンドを使用します。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    69
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    70
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    71
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    72
 % jdb MyClass 
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    73
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    74
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    75
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    76
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    78
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    79
この方法で起動すると、\f3jdb\fP は、指定されたパラメータを使って 2 つ目の Java VM を呼び出します。次に、指定されたクラスをロードして、クラスの最初の命令を実行する前に VM を停止させます。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    81
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    82
\f3jdb\fP のもう 1 つの使用方法は、すでに起動している Java VM に jdb を接続することです。jdb が接続する VM を、その実行中に起動するための構文を次に示します。これは、インプロセスデバッグ用ライブラリをロードし、接続の種類を指定します。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
\-agentlib:jdwp=transport=dt_socket,server=y,suspend=n
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    94
たとえば、次のコマンドは、MyClass アプリケーションを実行して、\f3jdb\fP があとでそのアプリケーションに接続できるようにします。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
 % java \-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n MyClass
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   106
次のコマンドを使用して、\f3jdb\fP を VM に接続できます。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   108
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   109
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   110
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   111
 % jdb \-attach 8000 
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   112
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   113
\fP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
.fi
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   115
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   116
.LP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   118
この場合、\f3jdb\fP は新しい VM を起動する代わりに既存の VM に接続されるため、\f3jdb\fP コマンド行には「MyClass」は指定しません。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   119
.LP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   121
デバッガを VM に接続するにはほかにもさまざまな方法があり、すべて \f3jdb\fP でサポートされています。接続オプションについては、Java Platform Debugger Architecture の
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   122
.na
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   123
\f2ドキュメント\fP @
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   124
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   125
http://java.sun.com/javase/6/docs/technotes/guides/jpda/conninv.htmlを参照してください。\f3jdb\fP で使用するために J2SE 1.4.2 以前の VM を起動する方法については、
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   126
.na
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   127
\f21.4.2 のドキュメント\fP @
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   128
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   129
http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.htmlを参照してください。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   131
.SS 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   132
基本 jdb コマンド
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   135
基本的な \f3jdb\fP コマンドの一覧を示します。Java デバッガがサポートするコマンドはこれ以外にもあり、それらは \f3jdb\fP の \f2help\fP コマンドを使用して表示できます。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   137
.RS 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   138
.TP 3
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   139
help または ? 
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   140
もっとも重要な \f3jdb\fP コマンド \f2help\fP は、認識されたコマンドのリストに簡潔な説明を付けて表示します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   141
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   142
run 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   143
\f3jdb\fP を起動して必要なブレークポイントを設定したあとに、このコマンドを使用して、デバッグするアプリケーションの実行を開始できます。このコマンドは、既存の VM に接続している場合とは異なり、デバッグするアプリケーションが \f3jdb\fP から起動したときにだけ使用できます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   144
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   145
cont 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   146
ブレークポイント、例外、またはステップ実行のあとで、デバッグするアプリケーションの実行を継続します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   147
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   148
print 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   149
Java オブジェクトおよびプリミティブ値を表示します。プリミティブ型の変数またはフィールドの場合には、実際の値が出力されます。オブジェクトの場合には、短い説明が出力されます。オブジェクトについては、以降の \f2dump\fP コマンドの説明を参照してください。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   151
\f2注: 局所変数を表示するには、その変数を含むクラスが \fP\f2javac(1)\fP\f2 \fP\f2\-g\fP オプションでコンパイルされている必要があります。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   153
\f2print\fP では、メソッドの呼び出しを含む多数の簡単な Java 式がサポートされています。次に例を示します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   154
.RS 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   155
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   156
o
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   157
\f2print MyClass.myStaticField\fP 
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   158
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   159
o
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   160
\f2print myObj.myInstanceField\fP 
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   161
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   162
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   163
\f2print i + j + k\fP (i、j、および k はプリミティブであり、フィールドまたは局所変数のいずれか) 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   164
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   165
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   166
\f2print myObj.myMethod()\fP (myMethod が null 以外を返す場合) 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   167
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   168
o
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   169
\f2print new java.lang.String("Hello").length()\fP 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
.TP 3
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   172
dump 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   173
プリミティブ値の場合には、このコマンドは \f2print\fP と同じです。オブジェクトの場合には、オブジェクト内に定義されている各フィールドの現在の値が出力されます。static フィールドと instance フィールドが出力されます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   174
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   175
\f2dump\fP コマンドでは、\f2print\fP コマンドと同じ式がサポートされます。  
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
.TP 3
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   177
threads 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   178
現在実行中のスレッドを一覧表示します。スレッドごとに、名前と現在の状態、およびほかのコマンドに使用できるインデックスが出力されます。次に例を示します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   179
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   180
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   181
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   182
4. (java.lang.Thread)0x1 main      running
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   183
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   184
\fP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   186
この例では、スレッドインデックスは 4 であり、スレッドは java.lang.Thread のインスタンスです。スレッドの名前は「main」であり、現在実行中です。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   187
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   188
thread 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   189
現在のスレッドにするスレッドを選択します。多くの \f3jdb\fP コマンドは、現在のスレッドの設定に基づいて実行されます。スレッドは、\f2threads\fP コマンドで説明したスレッドインデックスとともに指定します。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
.TP 3
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   191
where 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   192
\f2引数を指定しないで\fP where を実行すると、現在のスレッドのスタックがダンプされます。 \f2where all\fP コマンドは、現在のスレッドグループにあるスレッドのスタックをすべてダンプします。 \f2where\fP \f2threadindex\fP は、指定されたスレッドのスタックをダンプします。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   193
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   194
現在のスレッドが (ブレークポイントか \f2suspend\fP コマンドによって) 中断している場合は、局所変数とフィールドは \f2print\fP コマンドと \f2dump\fP コマンドで表示できます。\f2up\fP コマンドと \f2down\fP コマンドで、どのスタックフレームをカレントにするかを選ぶことができます。  
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   195
.RE
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   196
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   197
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   198
.SS 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   199
ブレークポイント
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   200
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   201
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   202
ブレークポイントは、行番号またはメソッドの最初の命令で \f3jdb\fP に設定できます。次に例を示します。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   203
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   204
.RS 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   205
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   206
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   207
\f2stop at MyClass:22\fP (MyClass が含まれるソースファイルの 22 行目の最初の命令にブレークポイントを設定) 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   208
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   209
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   210
\f2stop in java.lang.String.length\fP (\f2java.lang.String.length\fP メソッドの最初にブレークポイントを設定) 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   211
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   212
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   213
\f2stop in MyClass.<init>\fP (<init> は MyClass コンストラクタを識別) 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   214
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   215
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   216
\f2stop in MyClass.<clinit>\fP (<clinit> は MyClass の静的初期化コードを識別) 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   217
.RE
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   218
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   219
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   220
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   221
メソッドがオーバーロードされている場合には、メソッドの引数の型も指定して、ブレークポイントに対して適切なメソッドが選択されるようにしなければなりません。たとえば、「\f2MyClass.myMethod(int,java.lang.String)\fP」または「\f2MyClass.myMethod()\fP」と指定します。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   223
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   224
\f2clear\fP コマンドは、「\f2clear\ MyClass:45\fP」のような構文を使用してブレークポイントを削除します。\f2clear\fP を使用するか、引数を指定しないでコマンドを使用すると、現在設定されているすべてのブレークポイントが表示されます。\f2cont\fP コマンドは実行を継続します。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   225
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   226
.SS 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   227
ステップ実行
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   228
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   229
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   230
\f2step\fP コマンドは、現在のスタックフレームまたは呼び出されたメソッド内で、次の行を実行します。\f2next\fP コマンドは、現在のスタックフレームの次の行を実行します。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   231
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   232
.SS 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   233
例外
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   234
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   235
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   236
スローしているスレッドの呼び出しスタック上のどこにも catch 文がない場合に例外が発生すると、VM は通常、例外トレースを出力して終了します。ただし、\f3jdb\fP 環境で実行している場合は、例外が発生すると \f3jdb\fP に制御が戻ります。次に、\f3jdb\fP を使用して例外の原因を診断します。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   237
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   238
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   239
たとえば、「\f2catch java.io.FileNotFoundException\fP」または「\f2catch mypackage.BigTroubleException\fP」のように \f2catch\fP コマンドを使用すると、デバッグされたアプリケーションは、ほかの例外がスローされたときに停止します。例外が特定のクラス (またはサブクラス) のインスタンスの場合は、アプリケーションは例外がスローされた場所で停止します。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   240
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   241
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   242
\f2ignore\fP コマンドを使うと、以前の \f2catch\fP コマンドの効果が無効になります。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   243
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   244
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   245
\f2注: \fP\f2ignore\fP コマンドでは、デバッグされる VM は例外を無視せず、デバッガだけが例外を無視します。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   246
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   247
.SH "コマンド行オプション"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   250
コマンド行で Java アプリケーション起動ツールの代わりに \f3jdb\fP を使用する場合、\f3jdb\fP は、\f2\-D\fP、\f2\-classpath\fP、\f2\-X<option>\fP など、java コマンドと同じ数のオプションを受け入れます。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   251
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   252
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   253
\f3jdb\fP は、そのほかに次のオプションを受け入れます。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   254
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   255
.RS 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   256
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   257
\-help 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   258
ヘルプメッセージを表示します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   259
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   260
\-sourcepath <dir1:dir2:...> 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   261
指定されたパスを使用して、ソースファイルを検索します。このオプションが指定されていない場合は、デフォルトパスの「.」が使われます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   262
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   263
\-attach <address> 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   264
デフォルトの接続機構を使用して、すでに実行中の VM にデバッガを接続します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   265
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   266
\-listen <address> 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   267
実行中の VM が標準のコネクタを使って指定されたアドレスに接続するのを待機します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   268
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   269
\-listenany 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   270
実行中の VM が標準のコネクタを使って利用可能な任意のアドレスに接続するのを待機します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   271
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   272
\-launch 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   273
デバッグするアプリケーションを jdb の起動後ただちに起動します。このオプションによって、\f2run\fP コマンドを使用する必要がなくなります。デバッグするアプリケーションは、起動後、初期アプリケーションクラスがロードされる直前に停止します。その時点で、必要なブレークポイントを設定し、\f2cont\fP を使用して実行を継続できます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   274
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   275
\-listconnectors 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   276
この VM で利用できるコネクタを一覧表示します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   277
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   278
\-connect <connector\-name>:<name1>=<value1>,... 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   279
一覧表示された引数の値と指定のコネクタを使ってターゲット VM に接続します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   280
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   281
\-dbgtrace [flags] 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   282
jdb のデバッグ情報を出力します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   283
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   284
\-tclient 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   285
Java HotSpot(tm) VM (クライアント) 内でアプリケーションを実行します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   286
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   287
\-tserver 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   288
Java HotSpot(tm) VM (サーバー) 内でアプリケーションを実行します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   289
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   290
\-Joption 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   291
jdb の実行に使用される Java 仮想マシンに \f2option\fP を渡します。(アプリケーション Java 仮想マシンに対するオプションは、\f3run\fP コマンドに渡される)。たとえば、\f3\-J\-Xms48m\fP と指定すると、スタートアップメモリーは 48M バイトに設定されます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   292
.RE
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   293
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   294
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   295
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   296
デバッガとデバッグを行う VM を接続するための代替機構に対して、その他のオプションがサポートされています。その他の接続オプションについては、Java Platform Debugger Architecture の
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   297
.na
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   298
\f2ドキュメント\fP @
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   299
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   300
http://java.sun.com/javase/6/docs/technotes/guides/jpda/conninv.htmlを参照してください。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   301
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   302
.SS 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   303
デバッグ対象のプロセスに転送されるオプション
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   304
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   305
.RS 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   306
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   307
\-v \-verbose[:class|gc|jni] 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   308
冗長モードにします。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   309
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   310
\-D<name>=<value> 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   311
システムプロパティーを設定します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   312
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   313
\-classpath <directories separated by ":"> 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   314
クラスを検索するディレクトリを一覧表示します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   315
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   316
\-X<option> 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   317
非標準ターゲット VM オプションです。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   318
.RE
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   319
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   320
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   321
.SH "関連項目"
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   322
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   323
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   324
javac(1)、java(1)、javah(1)、javap(1)、javadoc(1)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326