News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

viewing generated assembler

Started by riched158, June 30, 2010, 03:35:03 PM

Previous topic - Next topic

riched158

hi

i am using codeblocks under windows using C and the gcc compiler.  I would like to look at the generated assembly code from my c code.  can someone tell me how i can generate the assembler listing for viewing of (not debugging)

cheers
richard

billyonthemountain

Just add -S to the compiler options or if using the command line :
gcc -S -c exampleC.c -o exampleASM.s

from gcc --help:
Quote
  -S                       Compile only; do not assemble or link
(ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)