examining floating point data with 'print' on non floating point kernel
Mark Kettenis
mark.kettenis@xs4all.nl
Fri Jul 15 18:09:00 GMT 2005
Date: Thu, 14 Jul 2005 21:16:27 -0400
From: Daniel Jacobowitz <drow@false.org>
version=3.0.2
On Thu, Jul 14, 2005 at 08:08:22PM -0500, Claudia Salzberg wrote:
> Hi,
>
> I am trying to use the 'print' command on a function declared in
> the program being debugged. This function takes in 10 values and
> prints them with a printf(%f). The program prints the values
> correctly if run independently of gdb. If the program is run on
> gdb normally (meaning with just run) they also print correctly.
> However, when called with the print command the output is
> unexpected and it prints either 0.00000 or nan where the various
> floating point values should be. This works fine on a power 3
> ppc box but does not work on the 440GP.
This means that your 440GP installation is using a different floating
point model than GDB thinks it is.
Or the Linux kernel on the 440GP doesn't properly initialize the FPU
when gdb writes the floating-point registers before the program itself
has executed an FPU instruction.
Mark
More information about the Gdb
mailing list