Re: variable viewing in gdb window
Re: variable viewing in gdb window
- Subject: Re: variable viewing in gdb window
- From: Andy Lee <email@hidden>
- Date: Mon, 02 Mar 2009 12:59:06 -0500
P.S. Did you get Quincey's email?
On Feb 28, 2009, at 5:06 PM, Quincey Morris wrote:
You're going to have to be a bit more systematic about this.
Randomly casting variables isn't really the answer.
At least go through these steps:
1. What is the value of 'data'? (p data) Is it nil? Is it something
that couldn't possibly be a legal object pointer?
2. What kind of object is 'data' pointing to? (po data) Is its class
NSData or some subclass of NSData?
Most likely, 'data' is pointing to something that's not a NSData
object, so it really doesn't respond to 'bytes'. (And that situation
would most likely mean you have a memory management error.)
Is this a GC application? There are some pitfalls using NSData with
garbage collection -- you have to be a bit careful how you write
your code.
Try step 2 of his advice. It takes two seconds. Also note his
question about garbage collection.
--Andy
_______________________________________________
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