List-Files with GNU

Julian Brown brown@cs.bris.ac.uk
Mon Oct 18 15:44:00 GMT 2004


On 2004-10-18, Kukuk Barbara <barbara.kukuk@siemens.com> wrote:
> Hi,
>
> I'd like to generate a file from a C source file where you
> can find the C code and the corresponding assembler statements.
> Is this possible with GNU?

Compile with debug info (-g), then use "objdump --source" on the
resulting object file. This also works with optimization enabled.

Cheers,

Julian



More information about the Gcc mailing list