Dan Rosenstark
Dan Rosenstark

Reputation: 69777

Debugging Only Obj-C/C in Xcode 4.3?

Now that I've upgraded to Lion and Xcode 4.3.x, the debugger is stepping into the ARC stuff. So I'm seeing a screen full of

libobjc.A.dylib`objc_retainAutoreleasedReturnValue:
0x1de7fe0:  pushl  %ebp

and pushl and movl and subl etc. Unfortunately I cannot symbolicate these, nor do I care to debug Apple's stuff. Is there any way to get the debugger to focus ONLY on code I actually have in my possession?

I'm using LLDB but the same thing happens with GDB.

EDIT: This happens on AppCode too, which says something (but I don't know what).

Upvotes: 14

Views: 573

Answers (3)

GarlicFries
GarlicFries

Reputation: 8323

While the message you've posted is ARC-related, this behavior has nothing to do with ARC; something's just dropping the debugger down into the assembly instructions. Using the Step Out button in the debugger is actually what you want to pull you back into your own code.

Upvotes: 0

JRG-Developer
JRG-Developer

Reputation: 12663

This probably isn't what you want to hear, but as of Xcode 4.5.2 (the current version of Xcode, or at least the most current I have ;), I don't believe it's possible to have the debugger automatically skip over Apple's internal instructions. I don't believe this is related to ARC in particular, but just how the latest version of the debugger is working.

Here's ways I've gotten around this while debugging:

1) You can use the "skip over" button to continue onto the next piece of code (and you may have to do this a few times to get out of Apple's stuff).

2) You can put a breakpoint right before and right after your code that you're debugging. This way, instead of using the skip over button, you can use the "play" button.

Upvotes: 1

ski_squaw
ski_squaw

Reputation: 1030

I don't use ARC yet, but I remember reading this which may have some clues on configuring the debugger that might help:

http://brian-webster.tumblr.com/post/20941658970/debugging-an-arc-mac-application-on-snow-leopard

Upvotes: 0

Related Questions