On Tue May 31 11, Dimitry Andric wrote: > On 2011-05-31 11:57, Alexander Best wrote: > ... > >>>however i've often read messages - mostly by bruce evans - claiming that > >>>anything greater than -O will in fact decrease a kernel's ability to be > >>>debugged just as well as a kernel with -O. > >>The critical option when -O2 is used is -fno-omit-frame-pointers, since > >>removing > >>frame pointers makes debugging impossible (on i386). With -O2 code is > >>moved around and > >>removed, so debugging is more difficult, but can still provide useful > >>information. > >any reason we cannot use -O2 -fno-omit-frame-pointers -fno-strict-aliasing > >as > >standard COPTFLAGS with debugging enabled for *all* archs? > > Most likely, the performance gain from -O2 is rather small, except for > special cases, but the pain during debugging is increased a great deal. > > Even if you add frame pointers, with -O2 large pieces of code can be > transformed, variables or even entire functions can be completely > eliminated, and so on, making debugging much more difficult.
*lol* we're moving in circles. so back to the beginning: why not use -O for all archs, if debugging was enabled? for amd64 -O2 is always set, no matter, if debugging is enabled or disabled. cheers. alex -- a13x _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"