On Dec 6, 2007, at 8:11 AM, Steve Sisak wrote: A little more detail:
Switching to a Quad G5, the problem goes away -- for now I'll just debug on the other machine, but it's a bit baffling.
Also, the source file in question includes a bunch of Mach headers, so it's possible that there's something making the preprocessor unhappy.
-Steve
At 10:30 AM -0500 12/4/07, Steve Sisak wrote:
Xcode 2.4.1, Mac OS X 10.4.10, Mac Pro (Intel)
I'm attempting to debug an application and when I step into a particular function, the Xcode debugger is showing <MacMemory.h> instead of the source file that I'm attempting to debug.
The register values are there, and the PC marker advances through the file as I step so debugging info should be there -- it's just showing me the wrong file.
I've tried:
1) Quitting and relaunching Xcode (to clear caches)
2) Rebuilding the project index
3) Deleting the .pbxuser and .mode1 files from the pacage bundle
4) Removing and re-adding the files to the project
I believe that this happened once before, but can't remember how I fixed it.
1) There are no caches that pertain here. Unlike CodeWarrior, Xcode writes everything it cares about to disk and doesn't retain very much state, except for the dependency graph.
2) The project index has nothing to do with debugging. Rebuilding it will have no effect.
3) The .pbxuser and .mode1 files only affect user interface geometry and your per-user breakpoints. I doubt they're involved.
4) Removing and re-adding files to the project won't affect this, as the debugger doesn't use the project file at all.
What the debugger does use is the debugging information, which could be in one of two places: built into the binary or aside in a .dSym file. I expect there's one of two problems: either you're still using STABS debug format, which sucks and is buggy, or you're using DWARF with dSym and your binary was rebuilt but your .dSym file was not.
I suspect the second case because moving the project to a different machine (which I assume involved rebuilding it clean) would have rebuilt the .dSym file to get it in synch with the binary, et voila.
In all likelihood the root problem is that the binary has code at different offsets than are recorded in the .dSym file. gdb is thinking you're stepping through a portion of your code that is composed of expansions of inlined routines defined in MacMemory.h, and that's why you're seeing it.
Chris |