views:

255

answers:

6

I'm using Xcode 3.2.3 and iPhone SDK

So I'm trying to debug a UIView subclass, I hit a breakpoint in an overridden method and I can't see any symbols in either the GUI or gdb, just globals and registers.

This is what I see:

(gdb) po self
No symbol "self" in current context.

Yet when I set a breakpoint in a UIViewController subclass, all the symbols are there:

(gdb) po self
<MyViewController: 0x5c18ae0>
Current language:  auto; currently objective-c

Some things I've tried:

  • clean all/rebuild
  • restart Xcode
  • change between debug and release
  • config these options in Project settings:
    • GCC_DEBUGGING_SYMBOLS = All
    • Symbols DEBUG_INFORMATION_FORMAT = DWARF, DWARF w/ dSYM File
    • BUILD_VARIANTS = normal, debug
  • threatening Xcode by swearing at it and typing rm -rf /Developer into a root bash prompt

Please help, my fingers are bleeding from debugging with NSLog

+2  A: 

So changing from Debug to Release did the trick and I have all my debug symbols.

I think it's just a bug in the 4.0 SDK.

MTS
so, should you mark this as answered?
Dad
This worked for me as well. Not intuitive at all. Changing to release build so you can get at symbols...
Jeremy Mullin
+2  A: 

I experience this bug often. My workaround is typing the bt command on the gdb console, it then automagically sorts itself out and starts recognizing symbols in the current context.

Julio Gorgé
A: 

Hmmm, tried to repro this in 3.2.3 and SDK4 Final with no success -- able to debug UIView subclass as expected. Is this occurring using one of the beta releases?

jstevenco
A: 

Happening to me, on a non-beta release. I just noticed that it only occurs when calling a class-defined method, ie (+) not (-)

I wouldn't mind not having a "self" pointer, but it also seems to wipe out all local variable displays in the debugger, and that is just wrong.

software evolved
A: 

MTS' method worked for me. Changing from debug to release fixes this issue. How strange. I can disprove software evolved's theory, as I experience the error inside an instance method.

ace
A: 

Yes, I am now experiencing it in instance methods as well. None of the workarounds listed above have made any difference. Argh!

software evolved