This is the mail archive of the gdb-patches@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: [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.


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