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: Daniel Jacobowitz <drow at false dot org>
- To: Nick Roberts <nickrob at snap dot net dot nz>
- Cc: Nikolay dot Molchanov at Sun dot COM, gdb at sourceware dot org
- Date: Tue, 19 Dec 2006 11:32:25 -0500
- Subject: Re: Can I use -data-evaluate-expression to evaluate sin(4.1)?
- References: <45877ECA.9090207@sun.com> <17799.41335.712243.659292@kahikatea.snap.net.nz>
On Tue, Dec 19, 2006 at 09:23:19PM +1300, Nick Roberts wrote:
> > -data-evaluate-expression sin(5.1)
> > ^done,value="3"
> > (gdb)
> >
> >
> > Can I use "-data-evaluate-expression" to evaluate
> > sin(x) function? If yes, why it returns a wrong
> > "int" value?
>
> By default (without debuginfo as Frederic says) it assumes sin takes an
> integer argument and returns an value (I think).
What does "ptype sin" say? I'd have expected GDB to pick up the type
from the debug info in that example.
--
Daniel Jacobowitz
CodeSourcery