Debugging with GDB Manual HP WDB v6.3 (5900-2180, August 2012)
8.11 Printing Floating Point Values
You can print the values of floating-point registers in different formats.
To print both single and double-precision values:
(gdb) info reg $fr5
fr5 (single precision) 10.1444092
fr5
To get the bit pattern, try the following macro:
define pbits
set *((float *) $sp)=$arg0
p/x *((int *) $sp)
end
This is what the macro produces:
(gdb) pbits $fr6
$1 = 0x4082852d
8.12 Floating point hardware
Depending on the configuration, GDB may be able to give you more information about the status
of the floating point hardware.
info float Display hardware-dependent information about the floating point unit. The exact
contents and layout vary depending on the floating point chip. Currently, 'info
float' is supported on the ARM and x86 machines.
8.13 Functions
GDB displays the declaration of all or some functions based on a few settings with the help of the
following commands.
info functions [regexp] Display the declaration of all functions, or of those matching
regexp.
set max-function-matches
integer
Set maximum number of function matches reported by the
info functions command. By default it is set to zero.
NOTE: This is an HP-UX specific command. You must set
max-function-matches to zero to report all matches.
show max-function-matches Display maximum number of function matches reported by
the info functions command.
set non-debug-functions
[on|off]
Enable or disable listing of non-debug functions by the info
functions command.
show non-debug-functions Display whether the info functions command lists the
non-debug functions also.
8.11 Printing Floating Point Values 75