C++ assembly code in codeblocks IDE on windows


I am using code blocks on my windows 10 machine with code blocks GUI. The compiler is GCC. However I am interested to see the assembly code of my C++ codes. Can someone please tell if that is possible?

Thanks in advance :-)
If you're trying to look at assembly in real time while debugging:

If you just want the compiler to output assembly, you have to run the compiler with the -S flag.
g++ -S hello.cpp

If you want it to output assembly to a file at the same time that it compiles, see the answer to this post.
Other compiler options

Then, whenever gcc compiles a file foo.c in the project, it will save the intermediate files as:
foo.s   # The assembly
foo.i   # The preprocessed source
Last edited on
Topic archived. No new replies allowed.