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


> 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...
It's probabily a stupid question but why?  If you're using any form of
optimisations then I can't see anything that could do this a being able
to produce very meaningful results as most of the main optimisations
work at a higher scope than individual lines of code.  If you're not
using optimisations then working out the correspondance between source
and asm. shouldn't be too difficult.

Have you looked at the asembler display features on things like ddd?

Cheers,
 - Martin
 
-- 
<< .sig file removed for cleaning >>



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