How to check assembly code of C program in Xcode 4?

Joined
Jul 31, 2011
Messages
3
Reaction score
0
Points
1
Hello everyone.

For example, I write a C program in Xcode4 and set a break point in the program, then run it. I want to see the assembly code of this C program。 How should I do it in Xcode4?

Thank you very much.
 
Joined
Sep 3, 2011
Messages
1
Reaction score
0
Points
1
can be done

Here's how in Xcode 4.1 (Lion only)

- When you hit your breakpoint, go to the menu Product > Debug Workflow, and select Show Disassembly When Debugging.

Can do it also on earlier revisions of 4.x that don't require Lion, but it's different, not integrated; also, I'm not sure how many revs back it works.

- Once you hit the bp, in the debugger console area (where NSLog prints stuff), type disass then hit return. That will print the whole disassembly for the code of the current context.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top