From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11481 invoked by alias); 4 Jan 2005 20:26:56 -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 11382 invoked from network); 4 Jan 2005 20:26:47 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 4 Jan 2005 20:26:47 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j04KQg0m028921 for ; Tue, 4 Jan 2005 15:26:42 -0500 Received: from localhost.redhat.com (vpn50-80.rdu.redhat.com [172.16.50.80]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j04KQfr01792; Tue, 4 Jan 2005 15:26:42 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 84FC37D79; Tue, 4 Jan 2005 15:26:29 -0500 (EST) Message-ID: <41DAFBF3.2060704@gnu.org> Date: Tue, 04 Jan 2005 20:26:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Brian Desany Cc: Peter Barada , gdb@sources.redhat.com Subject: Re: Quick question about "print EXPR" References: <20041222204733.96097.qmail@web51009.mail.yahoo.com> In-Reply-To: <20041222204733.96097.qmail@web51009.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-01/txt/msg00029.txt.bz2 Brian Desany wrote: >>Did you include in your program? > > > Yep, I did (the program itself works properly). > > FWIW the only lines of the program that aren't listed in my original post are: > #include > #include > > And just in case it matters, I compiled using the command "cc -lm -g test.c". > If I compile with "gcc -lm -g test.c", "p floor(whatever)" is always 16 (rather than 1 as in the > original post). Wonder if GDB can see this. What does: (gdb) ptype floor print? Andrew > [bdesany]$ cc -v > Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs > gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) > [bdesany]$ gcc -v > Reading specs from /home/bdesany/sys/lib/gcc/i686-pc-linux-gnu/3.4.2/specs > Configured with: ./configure --prefix=/home/bdesany/sys > Thread model: posix > gcc version 3.4.2 > > Thanks- > -Brian. > > > > > > __________________________________ > Do you Yahoo!? > Take Yahoo! Mail with you! Get it on your mobile phone. > http://mobile.yahoo.com/maildemo >