This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C source interspersed through assembly output
- From: Michel Lespinasse <walken at zoy dot org>
- To: Marty Hauff <marty dot hauff at rmit dot edu dot au>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 11 Nov 2003 19:55:05 -0800
- Subject: Re: C source interspersed through assembly output
- References: <sfb24578.003@its-mn-inet1.its.rmit.edu.au>
On Wed, Nov 12, 2003 at 02:36:33PM +1100, Marty Hauff wrote:
> I'm a bit surprised that I can't find any command option in the doco
> to intersperse the originating source code as a comment in the
> assembly dump. I'm trying to check the validity of my assembly
> output and its kinda hard to track stuff back to the original C
> without this feature.
>
> Am I blind or does this option really not exist?
You might use objdump -dS. However, this is much less useful than it
used to be: since the compiler reorders the code more often now, the
order of the instructions in the object file is not necessarily
correlated to the order of the line order in your source code.
--
Michel "Walken" Lespinasse
"In this time of war against Osama bin Laden and the oppressive
Taliban regime, we are thankful that OUR leader isn't the spoiled son
of a powerful politician from a wealthy oil family who is supported by
religious fundamentalists, operates through clandestine organizations,
has no respect for the democratic electoral process, bombs innocents,
and uses war to deny people their civil liberties." --The Boondocks