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

Table Of Contents
14.24.1.1 Printing Decimal floating point constant
(gdb) print <num><df/dd/dl/DF/DD/DL>
df, DF - _Decimal32
dd, DD - _Decimal64
dl, DL - _Decimal128
This prints the decimal floating point constant based on the data type.
14.24.1.2 Printing Decimal floating point variable
(gdb) print/<fmt> <var-name>
<fmt> = df, dd, dl
<var-name> - variable name
This prints the decimal floating point variable. If you specify format <fmt> then it prints
the variable based on its data type.
14.24.2 Handling Decimal Floating Point Data types
GDB supports decimal floating point values in command line call of functions that contain
decimal floating point arguments and which return decimal floating point arguments.
(gdb) print func1(1.2dd)
14.24.3 Evaluating Decimal Floating Point data types
HP WDB versions 5.9 and above enable you to evaluate the decimal floating point
variable and displays the output. Use the commonly used GDB commands for evaluating
and displaying expressions, such as print to evaluate the decimal floating point variable.
HP WDB supports:
Evaluation of expressions with decimal floating point constants and variables.
Setting or assignment of decimal floating point constant or variable.
Arithmetic operations such as addition, subtraction, multiplication, division, and
negation with decimal floating point constants or variables.
Comparison operations such as ==,!=, >, >=, <, <= with decimal floating point
constants or variables.
Conversion between data types during assignment, arithmetic and comparison
operations and while printing values in specified format.
Assignment of Decimal floating point value to variable:
(gdb) print <variable> = <dfp-const>/<dfp-var>
<dfp-const> = decimal floating point constant
<dfp-var> = decimal floating point variable
This assigns decimal floating point value to the variable according to its data type.
14.24 Debugging support for Decimal Floating Point data type 215