Debugging with GDB (February 2008)

Table Of Contents
Chapter 14: HP-UX Configuration-Specific Information 179
14.21.4 Support for 64-bit Java, C, aC++ stack unwinding
This release of HP WDB can show stack traces of mixed Java, C, and C++ programs in
the 64-bit mode. The stack trace functionality requires Java SDK version 1.4 or later
for HP-UX. Please check the HP web site for Java, http://www.hp.com/go/ java, for
availability of Java SDK version 1.4 or later.
To enable this feature, set the environment variable GDB JAVA UNWINDLIB to the
path to a libjunwind.sl. This library is part of the Java SDK version 1.3.1.02 or later
for HP-UX. When GDB JAVA UNWINDLIB is set to the path for a valid Java unwind
library, stack traces will show Java and C/C++ frames.
In this version, even if GDB JAVA UNWINDLIB is not set, HP WDB uses the libjun-
wind.sl specified by the Java Virtual Machine.
The types of Java frames supported are as follows:
Interpreter
Compiled frames
Adapter frames
14.21.5 Enhanced support for C++ templates
This version of HP WDB includes these features to support C++ templates:
Setting breakpoints in template class functions and template functions without
having to specify details about the instantiation.
The ptype command shows any one of the class instantiations.
A option -v in ptype command will now display the field offset and size information of
a struct/union/class in addition to the default type information.
Syntax:
ptype [-v] [struct|union|enum|class]
Example:
(gdb) ptype -v struct info
type = struct info /* off 0 bits, len 512 bits */
int i;
/* off 0 bits, len 32 bits */
char a[20];
/* off 32 bits, len 160 bits */
struct details d;
/* off 192 bits, len 256 bits */
int b : 2;
/* off 448 bits, len 2 bits */
int c : 3;
/* off 450 bits, len 3 bits */
< filler >
/* off 453 bits, len 27 bits */
float f;