Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
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 */
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.
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
where, A and B are ordinary numeric expressions, perhaps in parentheses.
This is also the format in which the debugger displays a Complex value.
Imaginary values cannot be assigned to variables because there is no imaginary data type. You
can take a normal number and multiply it by an imaginary number and get another imaginary
number. You can take a normal number and add it to an imaginary number to get a complex
number.
Complex numbers cannot be used in arithmetic expressions in the debugger.
For more information of _Complex type, refer to the HP C/ANSI C documentation.
168 HP-UX Configuration-Specific Information