This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: return type of a fucntion


>Hi,
>When I print $r3 on returning from a function, I get the return value. But
>is there a way to get the type of the return value (eg. whether it is a
>pointer or an interger)??

If you know which function you're in, you could always 'ptype
functionName' where 'fuctionName' is replaced with the function's name
and you'll see the type that the function returns. Then you could cast
$r3 to that type.  Of course this doesn't works so well with
float/double as well as structures.

-- 
Peter Barada
peter at baradas dot org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]