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)?
> > 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?
(gdb) whatis sin
type = <text variable, no debug info>
(gdb) ptype sin
type = int ()
> I'd have expected GDB to pick up the type
> from the debug info in that example.
If the executable knows what kind of function sin is, then you would think that
GDB should be able to infer it from the executable. ISTR this has come up
before (just with "print") but that you expressed no surprise then.
--
Nick http://www.inet.net.nz/~nickrob