This is the mail archive of the
mailing list for the GDB project.
Re: Quick question about "print EXPR"
- From: Andrew Cagney <cagney at gnu dot org>
- To: Brian Desany <brian at desany dot com>
- Cc: Peter Barada <peter at the-baradas dot com>, gdb at sources dot redhat dot com
- Date: Tue, 04 Jan 2005 15:26:27 -0500
- Subject: Re: Quick question about "print EXPR"
- References: <email@example.com>
Brian Desany wrote:
Did you include <math.h> 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:
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
Wonder if GDB can see this. What does:
(gdb) ptype floor
[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
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.