How can I examine assembly in Xcode 4? How can I examine assembly in Xcode 4? objective-c objective-c

How can I examine assembly in Xcode 4?


The "View Disassembly" option is gone, as far as I can tell.

Here's one workaround:

  1. Build your project
  2. Open the build log, and use the search window to find the compile command that was used to build the source file you're interested in. Copy the entire build command.
  3. Open a terminal window, and cd to your project directory.
  4. Paste the build command from the build log into the terminal, and append -save-temps. Hit enter.
  5. You now have two new files, yourFile.i and yourFile.s, which are the preprocessed source and generated assembly, respectively, built exactly as they are in your project.

Alternatively, you can disassemble the built binary (or the object file resulting from your source file) using otool -tvV /path/to/binaryOrDotOFile.

Finally, if this is a feature that you would like to have back, make sure to file a bug report!

Edit:This feature is back in Xcode 4.1. In the assistant editor pane, select "Generated Output -> YourFilename (Assembly)". Boom!


You can build Assembly by going to Product->Generate Output->Assembly File.Hope this is what you are looking for.

Note: They changed it again in Xcode 5. The above answer is doing the thing now


In Xcode 5.0.2 you can select Product → Perform Action → "Assemble MyController.m"

N.B.While this question refers to Xcode 4, it comes up high in results on google.