GDB and Displaying Property values
I would like to obtain the value for my declared properties while debugging. With Xcode's GUI debugger 99% of the time it displays nothing of value. NSLog is my only resort. I'm now trying to understand and appreciate GDB.
My property:
@property (nonatomic, retain) UIView *myView;
@synthesize myView;
I would like to display the value of my frame width: myView.frame.size.width
NSLog displays the correct width however with the GDB console (i set a break point):
po myView produces <UIView: 0x526e10>
po (CGRect)[myView frame] produces the message "Previous frame inner to this frame (gdb could not unwind past this frame) Value can't be converted to integer."
po myView.frame.size.width produces the message "There is no member named frame"
po [myView frame] and po [[[myView frame] size] width] produces the message "Program received signal EXC_BAD_ACCESS, Could not access memory"
Any help in getting GDB (or Xcode) to display the contents of my properties and other class members would be terrific. I'm coming from a MS Visual Studio debugger background so please forgive my ignorance on how debugging is performed within Xcode.
As always, much appreciated!
Last edited by quantass; 01-04-2010 at 12:20 AM.
|