Re: variable viewing in gdb window
Re: variable viewing in gdb window
- Subject: Re: variable viewing in gdb window
- From: Quincey Morris <email@hidden>
- Date: Sat, 28 Feb 2009 14:06:42 -0800
On Feb 28, 2009, at 13:35, Daniel Luis dos Santos wrote:
It still says that the object does not know the selector. I even
tried casting the target like :
p (void*)[(NSData*]data bytes]
but no cigar.
I have some times found that casting the target usually solves the
question, but not in this case. Is this considered a bug, or is gdb
not truly adapted to debugging Objective C code ?
As anyone else complain about it ?
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.
_______________________________________________
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