Author Topic: viewing generated assembler  (Read 2879 times)

Offline riched158

  • Single posting newcomer
  • *
  • Posts: 2
viewing generated assembler
« on: June 30, 2010, 03:35:03 pm »
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

Offline billyonthemountain

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: viewing generated assembler
« Reply #1 on: July 03, 2010, 12:12:11 pm »
Just add -S to the compiler options or if using the command line :
Code
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)