I'm tuning some code that runs in a tight loop in my iPhone app and I'm curious to see the generated assembly code to see if anything looks out of the ordinary.
In Xcode 3.x, there was a Build > Show Assembly Code option in the menu, but I don't see anything in the menus or the documentation for Xcode 4.
Anyone know how to do this? I could do "gcc -S" but my understanding is that that won't be identical to how the entire project is compiled.
The "View Disassembly" option is gone, as far as I can tell.
Here's one workaround:
-save-temps
. Hit enter.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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With