Re: variable viewing in gdb window
Re: variable viewing in gdb window
- Subject: Re: variable viewing in gdb window
- From: Jim Ingham <email@hidden>
- Date: Tue, 3 Mar 2009 10:51:46 -0800
64-bit debugging of the higher stacks (including ObjC) even with the
latest Leopard tools is a little rough. You'll notice that the
debugger can't always backtrace out of code that it could in the 32
bit case. If you're an ObjC programmer, then any functionality that
involves the debugger calling into the ObjC runtime doesn't work. We
needed some support from the runtime to implement this safely, and
that support didn't make it into the 64 bit runtime for Leopard. This
is more serious than just something like "po" not working. In order
to figure out the implementation function for a given method call on
an object, we have to ask the runtime. That's why both stepping into
ObjC methods, and calling ObjC methods don't work in the 64 bit app
case.
All this is fixed in SnowLeopard, and the 64 bit debugger works well
there. But not in Leopard.
Jim
On Mar 3, 2009, at 7:54 AM, Daniel Luis dos Santos wrote:
In fact I forgot to mention that I am targeting 64 bit, but with no
GC.
I just wanted to get a feeling for how reliable is debugging in
Xcode. Of course I can always put log statements in the code but
that I want to avoid. At least if there were some log framework for
cocoa like log4j. Is there any ?
thanks
On Mar 2, 2009, at 6:13 PM, Andy Lee wrote:
On Mar 2, 2009, at 1:00 PM, Quincey Morris wrote:
On Mar 2, 2009, at 08:45, Andy Lee wrote:
First let's clear something up: "print [data bytes]" won't work,
so I don't see any point in repeatedly trying it. What's weird
is that I get a different error than you do:
---------------
(gdb) print data
$1 = (NSData *) 0x138460
Current language: auto; currently objective-c
(gdb) print [data bytes]
Unable to call function "objc_msgSend" at 0x9169c670: no return
type information available.
The error message you're seeing doesn't suggest any problem with
'data' -- it's just gdb insisting you cast the result.
Good point. There's a difference between the questions "How do I
enter a command that gdb accepts?", "Do I have a bug?", and "Does
gdb/GC/something else have a bug?"
--Andy
The difference in Daniel's case is that his 'data' pointer is
(apparently) a 64-bit value, implying this is a 64-bit app. So the
error message he's seeing could be:
a. 64-bit gdb's version of the same error message you got (in
which case 'print (void*) [data bytes]' ought to work).
b. 64-bit gdb not working right (and I've seen a fair number of
complaints about that on this list).
I think your suggestion of logging the value instead is a good
one. Unless someone can jump in and spot something obvious, this
does begin to look like a candidate for a bug report.
_______________________________________________
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