News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

How to redirect verbose assembler output to a file

Started by pabristow, July 27, 2016, 06:16:57 PM

Previous topic - Next topic

pabristow

Wanting to see what the compiler is making of my C++ code, I've added

-fverbose-asm -Wa,-adhln -g

as a magic command to "Other compiler options" to my build and get the expected (verbose indeed) output to the build log from

-------------- Build: Debug in normal (compiler: GNU GCC 6.1.1 Compiler)---------------

g++.exe -std=c++17 -g -fverbose-asm -Wa,-adhln -g -Wall -fexceptions -II:\modular-boost -c J:\Cpp\normal_constexpr\normal\normal_constexpr.cpp -o obj\Debug\normal_constexpr.o

But I'd rather have it to a separate file (takes quite a long time to write to screen for one thing).

Can any GCC guru suggest what extra magic is required for this, say output to /debug/my_asm.s ?

(All the suggestions on the web assume you are using a command line, not the codeblocks IDE.)

Thanks  Paul


stahta01

I would suggest trying post or pre build step using the internet command line information.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]