Re: Use -O1 optimization but avoid <optimized out>?

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

 



On Sat, 4 Apr 2015, Jeffrey Walton wrote:

I'm currently building with -O1 and -g3, and I'm seeing values as
<optimized out> under the debugger. This is expected (but not
desired).

I'm interested in building my program with -O1 to invoke analysis for
the warnings I have enabled. But I don't want the resulting binary to
have values optimized out when viewing them under the debugger.

Is there a way to use -O1 (for warnings and analysis) but avoid
<optimized out> (for debugging)? If so, then how would I go about it?

-Og could help with recent versions, but not as much as compiling several times with different options.

--
Marc Glisse




[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