g++ compile option question
Joel Sherrill
joel.sherrill@OARcorp.com
Tue Aug 19 20:29:00 GMT 2003
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
More information about the Gcc
mailing list