Best command line options for debug/release builds

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

 



Hi everyone,

I have a project that is intended to be run with debugging turned on. It's a Wikipedia bot, so performance is not a priority, while having the code detect and report all possible errors without damaging Wikipedia *is* a priority. I'm not running it within a debugger, but I want the code to be internally safe (eg it pads string arrays with extra chars just in case they get accidentally overwritten, it checks for NULL before dereferencing a pointer, etc.)

Now, in order to get my code running as a 'release' build, I have always thought that one selects either -O2 or -O3 and that's it, while to run it as a debug build means simply to remove the -Ox option. But there's more to a 'debug' build than that. What are your favourite command line options to get a 'debug' build, or a 'release' build?

Richard





[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