Darren J Moffat writes: > > One thing that's missing here is a translation of #define DEBUG into > > #undef NDEBUG for user space programs. I think that'd be a really > > welcome addition to the system. > > Rather than tweaking Makefiles I do this in my environment by (ab)using > $COPTFLAG eg for userland: > export COPTFLAG="-g -DDEBUG"
You shouldn't have to do that at all. Enabling low-cost debug features (such as assertions) ought to be the automatic *default* when building a DEBUG image. > Another thing I've always wanted to get around to doing for userland is > to have it all built with "-g" when we run a debug nightly. There are > sometimes issues if you have "-g" set for all of userspace build. I can see where that's useful, but I'd rather have things built all the time with a decent set of symbols. It'd sure be nice if the compilers were updated to generate CTF directly and by default. -- James Carlson, Solaris Networking <james.d.carlson at sun.com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
