Inspecting synthesized variables in gdb
Inspecting synthesized variables in gdb
- Subject: Inspecting synthesized variables in gdb
- From: Ingvar Nedrebo <email@hidden>
- Date: Fri, 19 Jun 2009 17:52:48 +0100
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 (email@hidden)
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:
This email sent to email@hidden