[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] How does one get gcc *.lst file with interspersed Sou
Re: [avr-gcc-list] How does one get gcc *.lst file with interspersed Source Listing and Assembler?
Thu, 1 Dec 2005 23:09:35 -0800
Resending to the list.
> I Tried "gcc -Wa,-alh hello.c", but it didn't work. I get output that looks
> like the following (it doesn't have the *.c lines interspersed to where it
> corresponds to chunks of Assember code). Does anyone know a way to get the
> *.c source lines interspersed within the below output (i.e. what gcc or as
> options etc…?)?
This should work for you:
avr-gcc -c -gstabs -Wa,-ahlmsd=file.lst file.c
The assembler is what produces the combined listing and it requires
the stabs information in order to get the line number information.
avr-objdump --source file.o
will also produce an intermixed listing, but I personally find this
inferior to the one produced by letting the assembler do the listing.
Vancouver, BC, Canada