This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Function return type checking
- From: Klee Dienes <kdienes at apple dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: Klee Dienes <klee at apple dot com>, Daniel Jacobowitz <drow at mvista dot com>, gdb-patches at sources dot redhat dot com
- Date: Tue, 12 Mar 2002 10:07:39 -0800
- Subject: Re: [RFA] Function return type checking
Saying that I "need" the infrastructure change for Objective-C would
probably be a bit strong.
The basic issue arises when evaluating Objective-C expressions like the
following:
call [[window boundingBox] print]
Here 'window' is of type NSWindow, an opaque type defined in a system
library, and 'boundingBox' is a method of NSWindow that returns a
NSRect. The issue arises because '[window boundingBox]' is really a
function call to 'objc_msgSend_stret (window, selector)'. There
generally isn't symbol information available for 'objc_msgSend_stret',
but there often is for '[NSWindow boundingBox]'. So it's nice for
Objective-C to be able to pass the correct return type information to
'call_function_by_hand' so that the result returns with the correct
type, rather than have to cons up a fake function value with fake return
type to pass to 'call_function_by_hand'.
On Tuesday, March 12, 2002, at 07:55 AM, Andrew Cagney wrote:
> So there are two reasons for the change? The infrastructure you need
> for objective C and a user visible interface change. Can you expand a
> little on the objective C problems. If objective C has good reason for
> this infrastructure than I can't see why that part shouldn't go in.