This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to have gcc generate assembler code with C source listed?


Chen (é) Jun (å) wrote:
> Hello, all,
> 
> We know that -S option makes gcc output assembly code in a .s file so we
> can examine. I'd like to know can I have gcc generate .s file with
> original C/C++ source code listed side by side(but in comment blocks)
> with assembly code. The benefit for this is the reader can easily know
> which  C/C++ statement corresponds to which assembly(assembler) code.
> 
> Is there any options to enable this? If yes, since what version of gcc
> is it supported?

All of them.

-g -Wa,-adhls


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]