Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
Arithmetic Operations:
(gdb) print a(op1)b
(gdb) print (op2)a
op1 = addition, subtraction, multiplication and division.
op2 = negation
This performs arithmetic operation with decimal floating point data types.
Comparison Operations:
(gdb) p <dfp-val> (op) <dfp-val>
where,
op = ==, !=, >, >=, <, <=
If expression contains comparison operation, then GDB compares the decimal floating
point data types accordingly.
(gdb) p 1.2dd == 1.2dd
(gdb) 2.4
14.24.3.1 Printing type of Decimal Floating Point variable
(gdb) ptype <dfp-const>/<dfp-var>
This prints the type of the Decimal floating point variable or constant.
(gdb) ptype 1.22dd
type = _Decimal64
Conversion of types:
GDB handles conversion of data types during assignment, printing, and arithmetic and
comparison operation.
(gdb) p 1.2df +1.2dd
This converts double data type (1.2) to _Decimal64 data type and performs addition
operation with _Decimal64 data type (1.2dd) and prints value in _Decimal64 type.
HP WDB handles exceptions such as overflow, infinity and division by zero for Decimal
Floating Point data type.
(gdb) print 1.2dd / 0
(gdb) inf
HP WDB handles finite, infinite and NaN(Not a Number) values of decimal floating
point data type.
216 HP-UX Configuration-Specific Information