Like Alex, I have problems with gdb not stopping at some of the breakpoints I set. I do recognize the difference between Build&Run and Build&Debug, and I am using the latter. Sometimes the debugger stops where I put a breakpoint, sometimes it stops, but on a different line, sometimes it doesn't stop at all, and sometimes it won't let me place a breakpoint on the line I want.
As one would guess, it helps to write one statement per line, break up complex statements, and expand macros. Even so (and also turning off code optimization), I still find that a lot of my breakpoints just won't work. And then, there are the frequent occasions on which the debugger stops at a breakpoint but then dies and gives me no useful information, or shows a nonrecursive function calling itself, or tells me a variable is out of scope when it clearly should be IN scope.
Frankly, I waste less time creating my own debugging statements than trying to figure out what gdb is doing. That's disappointing, and I wonder if there are some good resources on learning to use Xcode/gdb more effectively? Is there, for instance, a reference that explains messages like "Frame identical to previous; corrupt stack?" and provides some hints on what classes of bug are likely to elicit particular error or crash modes?
PowerBook Mac OS X (10.4.8)