The case of the broken breakpoints
The case of the broken breakpoints
- Subject: The case of the broken breakpoints
- From: Oftenwrong Soong <email@hidden>
- Date: Thu, 31 Dec 2009 13:51:07 -0800 (PST)
Hi all,
I need to know if this is a known bug or if I've lost my marbles (or both).
Under some circumstances (and I cannot yet define exactly what those circumstances are), it appears that Xcode suddenly decides to ignore breakpoints, meaning that gdb does not pause execution on lines where I place a breakpoint.
Breakpoints *did* work until about an hour ago. I was coding, running, and debugging away when suddenly, breakpoints stopped working.
I've spent considerable time researching this topic, today and in the past, and posted about it right here on one occasion in the past. On that occasion, I came to the conclusion that I had accidentally pushed "Go (Run)" rather than "Go (Debug)," which would mean that gdb was not being used at all. However, I am now convinced that I was wrong at that time and that something in the vast depths of Xcode gets confused. It either doesn't properly pass the breakpoints to gdb or it mistakenly believes that the breakpoints are in a module which does not get loaded into memory.
I'll explain why I believe this to be the case:
First, I am most definitely pushing "Go (Debug)" and/or "Debug" and I see gdb output, such as "GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)" and the copyright lines that follow it.
Second, I am using the Debug build configuration, NOT Release. All of the project settings are as the project template set them. I did not change any settings, build-related or not.
Third the breakpoints are displayed as yellow arrows in the Xcode margin, not as blue arrows as they normally should.
The program executes to completion but execution does NOT pause at any of the breakpoints. At first, I thought those source lines may have been optimized away, but I later came to the conclusion that they most certainly are not -- I placed a breakpoint on EVERY line in the program's main() function. They *all* turned yellow and were "ignored." The program happily executed the entire program, including various printf() calls in main(), all of which had breakpoints set on them. The printf() output appeared in the Xcode console. Sadly, execution did not pause on any of those lines.
Other steps I took:
I performed a "Clean All Targets" and retried. Breakpoints didn't work.
I performed a "Touch," followed by a "Clean All Targets" and rebuild, and retried. Breakpoints still didn't work.
When that didn't work, I exited Xcode, deleted the build directory, relaunched Xcode, rebuilt, and retried. Breakpoints *still* didn't work. Quoth the raven, 'Nevermore.'
Finally, I exited Xcode, deleted the .xcodeproj directory and the build directory. Then I relaunched Xcode, created a new "C++ Tool" project file, imported my sources, rebuilt, placed a breakpoint, and retried. Finally, it *did* work. Therefore, whatever caused this problem must have been in one of the three files inside the .xcodeproj directory. Unfortunately, I deleted those and in retrospect should have kept a copy around for analysis. I'll do that the next time this problem crops up.
I am using what I believe to be the most recent release of Xcode, 3.1.3. From the About Xcode box:
- Xcode IDE 1191.0
- Xcode Core 1192.0
- ToolSupport 1186.0.
As I said above, gdb is version 6.3.50-20050815 (Apple version gdb-966).
I am running Mac OS X 10.5.8.
Please offer suggestions and pointers. This problem has driven me nuts on and off for a while now and is obviously an enormous distraction in the midst of what would otherwise be a fruitful programming session.
Thanks for any ideas you can offer...
Soong
_______________________________________________
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