Search:
Forum
Windows Programming
C++ assembly code in codeblocks IDE on w
C++ assembly code in codeblocks IDE on windows
Dec 6, 2020 at 8:18pm UTC
BZKN
(19)
Hi,
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
Ganado
(6811)
If you're trying to look at assembly in real time while debugging:
https://stackoverflow.com/questions/9619215/how-to-view-the-disassembly-in-codeblocks
If you just want the compiler to output assembly, you have to run the compiler with the -S flag.
https://stackoverflow.com/questions/137038/how-do-you-get-assembler-output-from-c-c-source-in-gcc
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.
https://stackoverflow.com/questions/48831202/how-to-view-assembly-code-in-codeblocks
Other compiler options
-save-temps
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.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs