The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 08-13-2007
porter porter is offline
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by Yuriy07 View Post
Also, I see that local variables are shown incorrecly when program is built with +O2 optimization switch. They show correcly with +O0 or +O1 optimization.
Often optimizations are incompatible with debuggers because optimizers will re-organize variables on the stack for efficiency, um, basically optimizing the thing.

Optimizers are more aggressive and less forgiving of dodgy code.

Also, if you are using C++ libraries, have these been built with the same optimizations?


Use maximum warning and errors during compilation, for HPUX compilers I use "-Aa -D_HPUX_SOURCE +e +We".

Try GCC and see if that exposes anything, again use "-Wall -Werror".
Reply With Quote