XCode - "Previous frame inner to this frame (gdb could not unwind past this frame)"
Recently, my debugger on XCode stopped working properly, and it gives this error:
Previous frame inner to this frame (gdb could not unwind past this frame)
I've been through the other thread here at SO, talking about missing symbols. I've fixed that by deleting the symbols directory and having it re-acquire them from the iPod. I don't see any errors in the log relating to missing symbols, so that seems to be fixed.
I am able to place a breakpoint in a开发者_JS百科pplicationDidFinishLaunching, and a few pieces of my code. So I'm thinking it's something wrong with my code. But I haven't the slightest clue what could cause this.
One place I can't place a breakpoint because of this is inside an object's step function, which is called by the engine every frame.
ETA: I've found I'm unable to get inside a cocos2d function. At the line where CCNode calls
[self addChild:child z:z tag:child.tag];
I can't "step into" without getting the GDB error. The call to it from my code looks normal to me:
Shot* tempshot = [[Shot node] retain];
[tempshot setPosition: CGPointMake(e_laneRX, m_laneYArr[spriteid - 103])];
tempshot.m_leftSide = false;
[self addChild: tempshot z:3];
Self here is an inheritor of CCLayer.
Ok, I figured it out. I have my cocos2d project cross-linked so I don't have to copy the files into the game project. Makes it much easier to upgrade Cocos versions mid-game development.
It turns out the cocos project (not sure if it was my fault, or if it came this way) for 0.99.5 had the debug version set to use LLVM GCC 4.2, and release uses GCC 4.2. The LLVM breaks the debugger for some reason. So switching to GCC 4.2 for debug in the cocos project fixed everything.
I experienced this issue too. Fixed it by changing the debugger from GDB to LLDB.
精彩评论