views:

140

answers:

0

Whenever I try to print the return value of a method in my XCode gdb console (and in the value formatters), I keep getting (IMP) pointers instead of the return value. For example:

print [alternateDepartures count] $9 = (IMP) 0x33725441 <-[NSCFArray count]+1>

here, alternateDepartures is an NSArray of ints, as evidenced by:

(gdb) po alternateDepartures ( 1275962180 )

Similarly, if I look at alternateDepartures in the variable view, it shows that alternateDepartures has 883748746 elements, whereas it actually has one element. If I do 'print description to console' I get

{type = mutable-small, count = 1, values = ( 0 : {value = +1275962180, type = kCFNumberSInt32Type} )}

which also seems fine. I'm just not able to call 'count' (or any other method at all) on any object using the XCode debugger.

Any ideas?