Re: gcc build with -O0 results in corrupted -debuginfo package

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

 



Petr Spacek wrote:
> I'm going to reproduce and debug issue in named. Do you see any specific
> reason why I should use -O2 for serious debugging/development sessions?

IMHO, you should always debug with optimization enabled. GDB can cope quite 
well with it, and it is the only way to actually debug the real code that 
gets executed. -O0 makes the code very different from production code, e.g., 
you can get away with more abuse of undefined behavior (and thus, if that 
was the cause of the crashes, you won't find them when debugging under -O0). 
Often, broken code only actually breaks under optimized compilation. This is 
all the more the case for issues triggered by an updated GCC. Even in those 
rare cases where the bug really is in GCC, it is often in an optimization 
pass and thus won't happen under -O0 either.

        Kevin Kofler

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux