viewing assembly code for Objective-c
-
08-12-2019 - |
Question
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
.
La solution
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
Autres conseils
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:
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow