Re: using -ggdb3 and -O3 simultaneously

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



lehe <timlee126@xxxxxxxxx> writes:

> I was wondering what is the purpose of using -ggdb3 and -O3 simultaneously
> for gcc? One is for debug and the other is for optimization. Is this to
> debug the optimized code? Can anyone point me to some reference explaining
> this well? Thanks!

Yes, that is to permit using the debugger on optimized code.  The -g
options control the generation of information for the debugger; they do
not affect the generated code.  The -O options control the amount of
optimization applied when generating code; they do not affect the debug
information.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux