This is the mail archive of the
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.firstname.lastname@example.org>
>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 at baradas dot org