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: Sat, 28 Feb 2009 20:04:38 -0500
David's advice does print the value returned by [data bytes]. Why do
you think it doesn't? Note that if you prefer it to be printed in
hex, you can use
p /x (long)[data bytes]
(I learned this just now by doing "help print" in gdb.) But it
doesn't matter, it's the same number.
When exactly are you entering your gdb command? Is it *immediately*
after the call to readDataOfLength:? Is it possible data has been
prematurely released, or had some other value assigned to it that is
not an NSData? Quincey gives excellent advice for diagnosing the
problem. gdb is telling you something is not what you thought it was,
so you need to figure out why not.
--Andy
On Feb 28, 2009, at 3:01 PM, Daniel Luis dos Santos wrote:
No I just want to know the value returned by that method. In this
case the value of the pointer, so I can see the memory contents in
the memory browser.
On Feb 28, 2009, at 6:46 PM, David Dunham wrote:
On 28 Feb 2009, at 07:33, Daniel Luis dos Santos wrote:
NSData *data = [pageFile readDataOfLength: lengthToRead];
I then want to know the value of calling the method : [data bytes]
I write that on the gdb command window and it tells me :
You use something like p (long) [data bytes] ?
David Dunham A Sharp, LLC
Voice/Fax: 206 783 7404 http://a-sharp.com
Efficiency is intelligent laziness.
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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