14.25 Language support

14.25.1 Enhanced Java Debugging Support

HP WDB shows stack traces of mixed Java, C, and C++ programs. It supports unwinding across Java frames and provides an effective way to examine stack traces containing mixed language frames (Java and C/C++) of both live Java processes and core files. This has been implemented by adding subcommands for Java VM debugging to gdb. The stack trace functionality requires Java SDK version 1.3.1.02 or later versions, for HP-UX. To nd the availability of Java SDK version 1.3.1.02 or later, go to the HP web site for Java, http://www.hp.com/go/java. Java stack unwind and the gdb Java subcommands features are available in gdb version 4.5 and later versions. From gdb version 5.3 and later versions, it requires SDK 1.4.2.10 and later versions, or JDK 1.5.0.03 and later versions in order to use the Java VM debugging features.

In order to use this functionality, the GDB_JAVA_UNWINDLIB environment variable must be set to the path name of the Java unwind library. This environment variable must be set for normal java debugging and java corefile debugging. The default location of the Java unwind library on various systems is shown following. The examples are for SDK 1.4; if you are using JDK 1.5, substitute /opt/java1.5 for /opt/java1.4.

For 32 bit IPF applications,

export GDB_JAVA_UNWINDLIB = /opt/java1.4/jre/lib/IA64N/server/libjunwind.so

For 64 bit IPF applications,

export GDB_JAVA_UNWINDLIB = /opt/java1.4/jre/lib/IA64W/server/libjunwind.so

For 32 bit PA applications,

export GDB_JAVA_UNWINDLIB = /opt/java1.4/jre/lib/PA_RISC/server/libjunwind.sl

For 64-bit PA applications,

export GDB_JAVA_UNWINDLIB = /opt/java1.4/jre/lib/PA_RISC2.0/server/libjunwind.sl export GDB_JAVA_UNWINDLIB = /opt/java1.4/jre/lib/PA_RISC2.0W/server/libjunwind.sl

If the SDK is installed in a location other than the default, substitute the non-default location for /opt/java1.4 in the previous commands.

14.25.1.1 Java Stack Unwind Features

The Java stack unwind features are useful for troubleshooting problems in the Java VM. Following is a list of the Java stack unwind features:

View mixed language frames information, including Java frames and C/C++ native frames, in a gdb backtrace.

Distinguish various Java frame types including interpreted, compiled, and adapter frames.

View Java method name, signature, and class package name for Java method frames.

14.25 Language support 217

Page 217
Image 217
HP gnu source-level debugger 5992-4701 manual Language support, Enhanced Java Debugging Support, Java Stack Unwind Features