C++ assembly code in codeblocks IDE on w
C++ assembly code in codeblocks IDE on windows
Dec 6, 2020 at 8:18pm UTC
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 :-)
Dec 6, 2020 at 10:00pm UTC
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
Dec 6, 2020 at 10:04pm UTC
Topic archived. No new replies allowed.
General C++ Programming
© cplusplus.com, 2000-2020 - All rights reserved -
Spotted an error? contact us