Frage

I'm reading over this awesome article on friday.com. bbum shows some objective-c code and the corresponding assembly. How can I view objective-c assembly code?

Assume I'm compiling from the OS X Terminal using gcc.

War es hilfreich?

Lösung

I never tried with objective-c (it works with C) but I guess you can use simply

gcc -S program.m

You can also use -fverbose-asm to make a more readable output

Andere Tipps

Use otool after compilation, or gcc -S <input>.c -o <output>.S, or just use XCode, it's pretty awesome... /Developer/usr/bin/xcodebuild from the directory containing your project, then:

enter image description here

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top