Can I use -data-evaluate-expression to evaluate sin(4.1)?
Frederic RISS
frederic.riss@st.com
Tue Dec 19 07:44:00 GMT 2006
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
More information about the Gdb
mailing list