This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: return type of a fucntion
- From: Peter Barada <peter at baradas dot org>
- To: smita at cse dot ucsc dot edu
- Cc: brandner at emt dot tugraz dot at, gdb at sources dot redhat dot com
- Date: Wed, 16 Apr 2003 23:37:46 -0400 (EDT)
- Subject: Re: return type of a fucntion
- References: <Pine.GSO.4.44.0304161249140.12775-100000@sundance.cse.ucsc.edu>
>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