From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1981 invoked by alias); 15 Jul 2005 18:09:31 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1969 invoked by uid 22791); 15 Jul 2005 18:09:29 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 15 Jul 2005 18:09:29 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j6FI9HvX017827; Fri, 15 Jul 2005 20:09:17 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j6FI9GZc017801; Fri, 15 Jul 2005 20:09:16 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j6FI97ee000621; Fri, 15 Jul 2005 20:09:07 +0200 (CEST) Date: Fri, 15 Jul 2005 18:09:00 -0000 Message-Id: <200507151809.j6FI97ee000621@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: salzberg@us.ibm.com, gdb@sources.redhat.com In-reply-to: <20050715011627.GA25003@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 14 Jul 2005 21:16:27 -0400) Subject: Re: examining floating point data with 'print' on non floating point kernel References: <20050715011627.GA25003@nevyn.them.org> X-SW-Source: 2005-07/txt/msg00180.txt.bz2 Date: Thu, 14 Jul 2005 21:16:27 -0400 From: Daniel Jacobowitz 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