Don, I've seen this happen too, but I'm pretty sure it was with GDB and not lldb. I'm not dead certain as it has been a while, but if we are experiencing the same bug then it's in Xcode and not either of the debuggers.
It's definitely happening with LLDB, so i'm in agreement with you that it's Xcode4. The other iOS dev on this project also sees this behavior, as do others on the Apple dev forums. Please file a report at http://bugreport.apple.com/
At the same time make a tarball of your whole project. You want to be sure you can get back to the code that stimulated the bug.
If at all possible make a minimal test case and attach it to the bug. That may not be possible for valid reasons. If you cannot make a test case, say so in your report.
Coders always want test cases but sometimes we can't get them. Next best is lots of reports from lots of people. Maybe one fan elicit the common thread.
I can't duplicate it at will -- sometimes it happens, sometimes not. When it does happen, it's often on a delegate callback, but it happened again yesterday on a simple for loop. I'll file a bug report, but our project is very large (the 2nd largest iOS project i've ever worked on). This isn't going to fix your problem anytime soon. To debug when the debugger won't work, use NSLog, printf, NSAssert, assert, Design by Contract, Class Invariants, and in-memory circular log buffers that dump there contents when doing so won't be disruptive.
I successfully wrote an AES hard drive encryptor in assembly code for an ARM embedded target for which my only "debugger" was a bank of eight LEDs that I could toggle on or off by setting bits in a byte at a certain fixed address. That's It.
If I can do that, you can debug your app without a source debugger.
I'm with you -- my first computer was an 1802-based RCA COSMAC VIP, and I had to learn 1802 machine code before I could get it to do anything. Debugging was difficult back then, but that was 1981. I learned C on an Atari ST and got used to printf-style debugging, but that was 1987. Assertions and OOP methodologies aside, it's now 2012, and while it's good that I can still use the old techniques when needed, it's concerning that Xcode4's debugging environment demands their continued usage because simple things like step-into and step-over (among other things) are less than reliable.
Regards,
John
|