jdb.1 revision 12442:aa8e52dfeee9
t
Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.

This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).

You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.

Title: jdb
Language: Japanese
Date: 2013��11��21��
SectDesc: ����������
Software: JDK 8
Arch: ����
Part Number: E58103-01
Doc ID: JSSON

"jdb" "1" "2013��11��21��" "JDK 8" "����������"
-----------------------------------------------------------------
* Define some portability stuff
-----------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://bugs.debian.org/507673
http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------
* set default formatting
-----------------------------------------------------------------
disable hyphenation
disable justification (adjust text to left margin only)
-----------------------------------------------------------------
* MAIN CONTENT STARTS HERE *
-----------------------------------------------------------------
"����"
jdb - Java������������������������������bug������������������������
"����"

.\}

jdb [options] [classname] [arguments]
.\}

options

����������������������������������������������������

classname

����������������������������������

arguments

class��main()��������������������

"����"

Java��������(JDB)����Java����������������������������������������jdb��������������������������JDB����������������jdb������������JDBA (Java Platform Debugger Architecture)������������������������������������������Java Virtual Machine (JVM)��������������������������������������Java Platform Debugger Architecture (JDBA) (http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/index.html)��������������������

"JDB����������������"

JDB��������������������������������������������������������������������������������������������������������������������������������JDB����������JVM����������������������������������java������������������jdb������������������������������������������������������������������MyClass����������JDB��������������������������������������������������

.\}

jdb MyClass
 
.\}

����������������������jdb������������������������������������������2������JVM������������������������������������������������������������������������������������JVM����������������

jdb��������������1������������������������������JVM��jdb��������������������jdb������������������VM��������������������������������������������������������������������������������������������������������������������������������

.\}

java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n MyClass
 
.\}

������������������������jdb����������JVM����������������

.\}

jdb -attach 8000
 
.\}

����������jdb����������������JVM������������������������JVM������������������jdb������������MyClass��������������������

����������JVM��������������������������������������������jdb����������������������������������������������������������Java Platform Debugger Architecture����������������������������������

"����jdb��������"

��������jdb��������������������������JDB��������������������������������������������������-help����������������������������������

help������?

help������?����������������������������������������������������������������������

run

JDB��������������������������������������������run����������������������������������������������������������������������run������������������VM������������������������������������������������������������jdb������������������������������������

cont

��������������������������������������������������������������������������������������������������

print

Java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������dump���������������������������� ����: ����������������������������������������������javac -g�������������������������������������������������������� print��������������������������������������������������������������������������Java��������������������

.\}

print MyClass.myStaticField
print myObj.myInstanceField
print i + j + k (i, j, k are primities and either fields or local variables)
print myObj.myMethod() (if myMethod returns a non-null)
print new java.lang.String("Hello").length()
 
.\}

dump

����������������������dump����������print����������������������������������������dump����������������������������������������������������������������������������������static������������instance��������������������������dump��������������print������������������������������������

threads

����������������������������������������������������������������������������������������������������������������������������������������������������������������������4������������������java.lang.Thread����������������������������������main������������������������

.\}

4. (java.lang.Thread)0x1 main running
 
.\}

thread

������������������������������������������������jdb��������������������������������������������������������������������threads������������������������������������������������������������

where

������������������where����������������������������������������������������������������where all����������������������������������������������������������������������������������where threadindex�������������������������������������������������������� ����������������(������������������suspend����������������)����������������������������������������������print����������dump������������������������up����������down������������������������������������������������������������������������������������������

"����������������"

������������������������������������������������������JDB����������������������������������

\h'-04'\(bu\h'+03'\c .\}

\(bu 2.3
.\} ��������stop at MyClass:22����MyClass����������������������������22������������������������������������������������

\h'-04'\(bu\h'+03'\c .\}

\(bu 2.3
.\} ��������stop in java.lang.String.length������������java.lang.String.length��������������������������������������

\h'-04'\(bu\h'+03'\c .\}

\(bu 2.3
.\} ��������stop in MyClass.<clinit>����<clinit>������������MyClass��������������������������������

����������������������������������������������������������������������������������������������������������������������������������������������������������������MyClass.myMethod(int,java.lang.String)������MyClass.myMethod()��������������

clear������������clear MyClass:45����������������������������������������������������clear��������������������������������stop��������������������������������������������������������������������������������cont����������������������������

"������������"

step����������������������������������������������������������������������������������������next����������������������������������������������������������

"����"

��������������������������������������������������catch��������������������������������JVM��������������������������������������������������JDB������������������������������������������JDB������������������������jdb������������������������������������������

����������catch java.io.FileNotFoundException������catch mypackage.BigTroubleException��������catch����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

ignore����������������������������catch��������������������������������ignore����������������������������JVM��������������������������������������������������

"����������"

������������java������������������jdb������������������������jdb������������-D��-classpath��-X������java��������������������������������������������jdb��������������������������������������������������������������

��������������JVM����������������������������������������������������������������������������������������������������������������������������������������������Java Platform Debugger Architecture (JPDA) (http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/index.html)������������������

-help

��������������������������������

-sourcepath dir1:dir2: . . .

������������������������������������������������������������������������������������������������������������������������(.)����������������

-attach address

����������������������������������������JVM������������������������

-listen address

��������JVM����������������������������������������������������������������������

-launch

������������������������������JDB����������������������������-launch������������������run����������������������������������������������������������������������������������������������������������������������������������������������������������������������������cont��������������������������������������

-listconnectors

����JVM��������������������������������������

-connect connector-name:name1=value1

����������������������������������������������������������JVM��������������

-dbgtrace [flags]

jdb��������������������������������������

-tclient

Java HotSpot VM����������������������������������������������

-tserver

Java HotSpot VM������������������������������������������

-Joption

JVM��option������������option������Java����������������������������������������������������������������������������1������������������������-J-Xms48m����������������������������������������48MB����������������java(1)��������������������

"����������������������������������������"

-v -verbose[:class|gc|jni]

��������������������

-Dname=value

����������������������������������

-classpath dir

������������������������������������������������������������������������

-Xoption

����������������JVM����������������

"��������"

\h'-04'\(bu\h'+03'\c .\}

\(bu 2.3
.\} javac(1)

\h'-04'\(bu\h'+03'\c .\}

\(bu 2.3
.\} java(1)

\h'-04'\(bu\h'+03'\c .\}

\(bu 2.3
.\} javah(1)

\h'-04'\(bu\h'+03'\c .\}

\(bu 2.3
.\} javap(1)

'pl 8.5i 'bp