I have a Song class that is subclassed by NSManagedObject. I use GDB to try to figure out what I have and it is difficult for me to name an accessory in my class using gdb.
Song.h:
@property (nonatomic, retain) NSString * title;
Song.m:
@dynamic title;
In the debugger, I see the "name" field of the object, when I try to print the value using an accessor, which should be generated at run time, if I understand correctly, this gives me an error:
(gdb) po aSong <Song: 0x59188d0> (entity: Song; id: 0x59162d0 <x-coredata://99BE63F8-840A-47B5-A259-BCD74E1811C4/Song/p2> ; data: { composers = "<relationship fault: 0x4d62f30 'composers'>"; dateCreated = nil; songLists = "<relationship fault: 0x59243c0 'songLists'>"; title = "cancel?"; }) (gdb) p aSong.title There is no member named title. (gdb) p [aSong title] Target does not respond to this message selector.
Most likely I'm doing something really stupid here, but what am I doing wrong? Is there a way to introspect an object and see what messages it will respond to using GDB?
ios objective-c gdb
Paul sanwald
source share