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]
Other format: [Raw text]

Re: g++ compile option question


Andrew Haley wrote:

Halifa Yehezkel-BYH005 writes:
> > Hello,
> > I will appreciate if you have any input to the following question:
> > I would like to compile a C or C++ src file and get the ASM listing after each or couple of C/C++
> lines. g++ with -S option will produce the ASM listing of the src file, but I am looking for something like
> 1 or couple of C lines then their ASM listing and so on...


This question should have gone to gcc-help.  However, the right anser
to this question is not generally known.  If you are using gas, try:

  gcc -g -S hello.c
  as -adhls hello.s

Or something like this:


gcc -Wa,-adlhs -g -c hello.c >hello.lst

Andrew.


--
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985


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