Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Studio 12.3: Debugging a Program With dbx Oracle Solaris Studio 12.3 Information Library |
4. Viewing and Navigating To Code
5. Controlling Program Execution
6. Setting Breakpoints and Traces
8. Evaluating and Displaying Data
11. Debugging Multithreaded Applications
16. Debugging Fortran Using dbx
17. Debugging a Java Application With dbx
Capabilities of dbx With Java Code
Limitations of dbx With Java Code
Environment Variables for Java Debugging
Starting to Debug a Java Application
Debugging a Java Application That Has a Wrapper
Attaching dbx to a Running Java Application
Debugging a C Application or C++ Application That Embeds a Java Application
Passing Arguments to the JVM Software
Specifying the Location of Your Java Source Files
Specifying the Location of Your C Source Files or C++ Source Files
Specifying a Path for Class Files That Use Custom Class Loaders
Setting Breakpoints on Java Methods
Setting Breakpoints in Native (JNI) Code
Customizing Startup of the JVM Software
Specifying a Path Name for the JVM Software
Passing Run Arguments to the JVM Software
Specifying a Custom Wrapper for Your Java Application
Using a Custom Wrapper That Accepts Command-Line Options
Using a Custom Wrapper That Does Not Accept Command-Line Options
Specifying 64-bit JVM Software
dbx Modes for Debugging Java Code
Switching from Java or JNI Mode to Native Mode
Switching Modes When You Interrupt Execution
Using dbx Commands in Java Mode
The Java Expression Evaluation in dbx Commands
Static and Dynamic Information Used by dbx Commands
Commands With Identical Syntax and Functionality in Java Mode and Native Mode
18. Debugging at the Machine-Instruction Level
19. Using dbx With the Korn Shell
When you are using dbx to debug a mixture of Java and native code, dbx commands fall into several categories:
Commands that accept the same arguments and operate the same way in Java mode or JNI mode as in native mode (see Commands With Identical Syntax and Functionality in Java Mode and Native Mode).
Commands have arguments that are valid only in Java mode or JNI mode, as well as arguments that are valid only in native mode (see Commands With Different Syntax in Java Mode).
Commands that are valid only in Java mode or JNI mode (see Commands Valid Only in Java Mode).
Any commands not included in one of these categories work only in native mode.
The Java expression evaluator used in most dbx commands supports the following constructs:
All literals
All names and field accesses
this and super
Array accesses
Casts
Conditional binary operations
Method calls
Other unary/binary operations
Assignment to variables or fields
instanceof operator
Array length operator
The Java expression evaluator does not support the following constructs:
Qualified this, for example, <ClassName>.this
Class instance creation expressions
Array creation expressions
String concatenation operator
Conditional operator ? :
Compound assignment operators, for example, x += 3
A particularly useful way of inspecting the state of your Java application is using the watch facility in the IDE or dbxtool.
Depending on precise value semantics in expressions that do more than just inspect data is not recommended.
Much of the information about a Java application is normally available only after the JVM software has started, and is unavailable after the Java application has finished executing. However, when you debug a Java application with dbx, dbx gleans some of the information it needs from class files and JAR files that are part of the system class path and user class path before it starts the JVM software. This allows dbx to do better error checking on breakpoints before you run the application.
Some Java classes and their attributes might not be accessible through the class path. dbx can inspect and step through these classes, and the expression parser can access them, once they are loaded. However, the information it gathers is temporary and is no longer available after the JVM software terminates.
Some information that dbx needs to debug your Java application is not recorded anywhere so dbx skims Java source files to derive this information as it is debugging your code.
The following dbx commands have the same syntax and perform the same operations in Java mode as in native mode.
|
The following dbx commands have different syntax for Java debugging than for native code debugging, and operate differently in Java mode than in native mode.
|
The following dbx commands are valid only in Java mode or JNI mode.
|