Search code examples
objective-cgccassemblycompilationobjc-message-send

viewing assembly code for Objective-c


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.


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