This is the mail archive of the gcc@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: embedding c code in assembly source


Paul Cadaret wrote:
Is it possible to get gcc to embed c/c++ source code in with the assembly source

Gcc doesn't have any support for this.


GNU as has support for producing mixed listings. Try
gcc -Wa,-ahdl -g tmp.c
At high optimization levels, this gets pretty useless pretty fast, as gcc will mix source lines, and also duplicate them, and there is no clear way to show this is a linear listing file.


Some debuggers can also show mixed listings in different ways.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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