Debugging with GDB Manual HP WDB v6.3 (5900-2180, August 2012)

NOTE: If the version of gdb on the system is older than version 4.5, it will be necessary to specify
the full path of the Java executable in order to use the gdb subcommands. For example: gdb /
opt/java1.4/bin/PA_RISC2.0/java p 23989
14.26.2 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:
(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;
/* off 480 bits, len 32 bits */
14.26.3 Support for _ _fpreg data type on IPF
HP WDB internally converts __fpreg data type to long double data type to evaluate an expression
or to print the value of the expression. Since long double data type has only 15 bit exponent as
opposed to 17 bit exponent of __fpreg, some precision is lost when the exponent is larger than
that can t in 15 bits.
14.26.4 Support for _Complex variables in HP C
HP C on Itanium systems supports a _Complex data type built from any of the floating point types.
A _Complex number holds a pair of floating point numbers; the first is the “real part” and the
second is the “imaginary part”.
Here are examples of declarations and initializations using _Complex numbers:
float _Complex glob_float_complex;
double _Complex glob_double_complex = 6;
long double _Complex glob_long_double_complex = _Imaginary_I;
__float80 _Complex glob_float80_complex = 8 + 9 * _Imaginary_I;
_Imaginary_I is a keyword which represents the square root of -1.
The debugger has limited support for _Complex variables. No arithmetic operations are allowed
with _Complex numbers. A _Complex number may be cast or assigned to any numeric data
type and vice versa.
A _Complex variable can be initialized with an expression of the form:
A + B * _Imaginary_I
14.26 Language support 175