Subject: Re: Getting mixed C & assembly output
To: None <firstname.lastname@example.org>
From: John Hayward <John.C.Hayward@wheaton.edu>
Date: 03/20/2001 19:47:59
There does not directly seem to be an option in gcc to get mixed C and
assembler, but if you look at the assembly options there is the option
-a which produces an assembly listing while the assembler is doint it's
work. You need to have h turned on and l=file for the listing file at
the assembly level and -g turned on at the gcc level. Since -Wa allows
one to pass assbler flags on to the assembler one can:
gcc -g -Wa,"-ahl=C2Asm.lst" C2Asm.c
to get an assembly listing of C2Asm.c which includes C source in the
listing file C2Asm.lst
Hope that helps.
On Tue, 20 Mar 2001, Steve Grunza wrote:
> Date: Tue, 20 Mar 2001 14:34:43 -0500 (EST)
> From: Steve Grunza <email@example.com>
> Reply-To: firstname.lastname@example.org
> To: email@example.com
> Subject: Getting mixed C & assembly output
> Does anyone know the incantation to get gcc (running on port-i386) to
> generate an output file with the assembly code ready to assemble and
> the C code kept as comments? The -S option generates the assembly file
> (as does -save-temps) but the original C isn't included. I'm trying
> to step through a device driver with ddb and knowing where I am
> with respect to the C code would be a big help.
> Thanks for any help/info
> Steven G.
> My normal system is down with an fsck'ing disk so please reply either
> to firstname.lastname@example.org or on this list. Thanks again.