This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: embedding c code in assembly source
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Paul Cadaret <gnu at usd dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 07 Jan 2004 17:48:50 -0800
- Subject: Re: embedding c code in assembly source
- References: <3FFC6EAB.5010605@ford.com> <3FFC70EB.2040402@usd.com>
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