Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: riched158 on June 30, 2010, 03:35:03 pm

Title: viewing generated assembler
Post by: riched158 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
Title: Re: viewing generated assembler
Post by: billyonthemountain 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