I've recently been experimenting with some code that takes advantage of the new features of Objective-C 2.0 and the 64-bit runtime: Synthesized variables, ie. declaring properties in a class extension without declaring the corresponding variables in the class interface - like so:

Foo.h:

@interface Foo
{}
@end

Foo.m:

@interface Foo ()
@property (copy) NSString * p;
@end

@implementation Foo
@synthesize p;
@end


But I can't get gdb to give up the values of such properties when debugging. I've tried:

(gdb) po foo.p
There is no member named p.
(gdb) po [foo p]
Target does not respond to this message selector.
(gdb) po [(id)foo p]
Target does not respond to this message selector.

Is it at all possible to inspect synthesized variables in gdb, or do I need to go back to old school declared variables? This is on Mac OS X 10.5.7, XCode 3.1.3.

Thanks,
Ingvar

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to