Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: pabristow on July 27, 2016, 06:16:57 pm

Title: How to redirect verbose assembler output to a file
Post by: pabristow on July 27, 2016, 06:16:57 pm
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

Title: Re: How to redirect verbose assembler output to a file
Post by: stahta01 on July 27, 2016, 07:48:43 pm
I would suggest trying post or pre build step using the internet command line information.

Tim S.