This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C and assembly listing


> 
> 
> ----- Original Message -----
> From: "Paolo Carlini" <pcarlini@unitus.it>
> To: "Sanjiv Kumar Gupta" <sanjivg@noida.hcltech.com>; <gcc@gcc.gnu.org>
> Sent: Monday, November 05, 2001 4:17 AM
> Subject: Re: C and assembly listing
> 
> 
> > Sanjiv Kumar Gupta wrote:
> >
> > > Microsoft compiler has a /FA option to produce C and assembly
> mixture. Does
> > > gcc provide a similar one???
> >
> > Usually, I invoke objdump with the -S switch on the object file (*.o)
> to obtain
> > that mixture (with -g for gcc).
> > Dunno if something like this can also be produced by gcc itself.
> >
> > Cheers,
> > Paolo Carlini.
> >
> This has been the best option for the x86 version, although it has been
> known to skip a few instructions.
> 
> 

The best option IMHO is to compile with -g to an object file, then do:

objdump --source --disassemble foo.o


Toshi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]