Re: Why doesn't NSMakePoint work from XCode/gdb?
Re: Why doesn't NSMakePoint work from XCode/gdb?
- Subject: Re: Why doesn't NSMakePoint work from XCode/gdb?
- From: Martin Wierschin <email@hidden>
- Date: Tue, 25 Jan 2011 15:27:44 -0800
Replying to myself because I found the cause:
// in .m NSPoint NTMakePoint( float x, float y ) { NSPoint ret; ret.x = x; ret.y = y; return ret; }
But it still doesn't work in gdb.. I get weird results:
(gdb) p NTMakePoint(4.0f,9.0f) $2 = { x = 0, y = 2.25 }
If I switch from gcc 4.0 to gcc 4.2, it works just fine. So some kind of bug in 4.0. Unfortunately I'm stuck with the older version for now. I'd like to ask why I need to cast return values for objc messages, eg:
(gdb) p [someArray objectAtIndex:0] Unable to call function "objc_msgSend" at 0x928c7ec0: no return type information available.
Why can't gdb use runtime introspection on the message receiver to determine the return type for the selector?
Even with gcc 4.2 I can't call a method without a cast. Is this a valid feature request, or am I missing something?
~Martin
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden