Author Topic: How to redirect verbose assembler output to a file  (Read 3126 times)

Offline pabristow

  • Multiple posting newcomer
  • *
  • Posts: 75
How to redirect verbose assembler output to a file
« 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


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: How to redirect verbose assembler output to a file
« Reply #1 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org