Can I use -data-evaluate-expression to evaluate sin(4.1)?

Nick Roberts nickrob@snap.net.nz
Tue Dec 19 20:14:00 GMT 2006


 > > 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



More information about the Gdb mailing list