> I was wondering how to recompile the whole system with debug symbols. And how 
> do I automatically include debug symbols when I'm building ports?

You can get everything to build with debug symbols by adding
"CFLAGS=-g" to /etc/make.conf. However, the system will strip the
binaries when it installs them. You could probably get the
non-stripped version installed if you really wanted to, but I'd
recommend not doing that, and just using the version in /usr/obj,
which shouldn't be stripped, for debugging.

Ports will also build with debugging symbols, but most of them will
probably be stripped on install as well. You can fix them by editing
/usr/ports/Mk/, and removing the "${STRIP}" from
INSTALL_PROGRAM. You also need to change STRIP_CMD to be something

> I experience so many segmentation faults, and it would be helpful to have 
> debug symbols everywhere.

Segmentation faults are pretty rare on all my systems, unless it's
code that is under active development. Are you sure it's not flaky
hardware? Note that not having problems under another OS is *not* a
sign that the hardware isn't flaky.

Mike Meyer <[EMAIL PROTECTED]>    
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to