Вопрос

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.

Это было полезно?

Решение

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

Другие советы

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top