Java Platform Debugger Architecture

As a demonstration of the Java Debug Interface (JDI), we are providing source code for the jdb debugger.

jdb man pages

jdb man pages for Windows

jdb man pages for Solaris

Invoking jdb

The jdb sample can be run by executing:

   java tty.TTY <options>.. <class-name>
where <class-name> is the name you would normally place on the java command line. The -help option provides information on options. Note: Be sure that the Java 2 SDK's lib/tools.jar file is on the class path used to invoke tty.TTY. The tools.jar file includes the JDI Library and to the compiled jdb class files.

For more information on invoking and connecting see Connection and Invocation Details section of the JPDA documentation, particularly the section on jdb.

Source for jdb

Full source code for jdb is included as part of the example code in the Java 2 SDK's lib/jpda directory, in examples.jar. (Use jar xvf examples.jar to extract the contents of examples.jar.) Note: this file also includes the source for javadt. Source code of these example application is included to provide concrete examples for debugger developers. Example code may be used, modified and redistributed by debugger developers providing they adhere to the terms in the copyright notice.

jdb uses the following packages (found in the examples.jar file):

tty
Application code
expr
Expression processing code

Building jdb

To completely rebuild the jdb classes from the provided source files, you need only to compile them. No special options are required, aside from those which set your classpath to include the JDI Library. However, if want to modify the expression parser in the file Expr.jj, you will need the JavaCC parser generator.