This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Can I use -data-evaluate-expression to evaluate sin(4.1)?
- From: Frederic RISS <frederic dot riss at st dot com>
- To: Nikolay dot Molchanov at Sun dot COM
- Cc: gdb at sourceware dot org
- Date: Tue, 19 Dec 2006 08:44:02 +0100
- Subject: Re: Can I use -data-evaluate-expression to evaluate sin(4.1)?
- References: <45877ECA.9090207@sun.com>
Hi,
On Mon, 2006-12-18 at 21:55 -0800, Nikolay Molchanov wrote:
> But if I ask "gdb" to evaluate sin(3.14) I get "1"
> (which is not correct), and if I ask to evaluate
> sin(4.1) or sin(5.1) I get "3" (?!).
I guess your system libraries aren't built with debuginfo. This means
that GDB won't know the sin function's prototype and it will interpret
the result as an int. There might also be other issues with passing
doubles to un-prototyped functions, but the previous point is sufficient
to explain your issue.
Fred