Search code examples
cmacosprofilinginstrumentsxcode-instruments

View both assembly and source lines from Instruments?


I'm trying to profile some difficult code in Instruments and need to see both assembly and the source code lines. Is there any way to switch views? The only way I know of is to not compile the program with -g so that there are no debug tables.. but it'd be extremely useful to see both on one screen where each set of assembly instructions are also marked as what line they actually implement in the source code.

How can I do this?


Solution

  • In the version of Instruments that comes with Xcode 6, when you are in the source view, there is a set of five small buttons above the source code you are viewing. Click the second button to show both the source code and disassembly views.

    enter image description here