Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Feb 2003 12:15:01 -0600
From:      Mike Meyer <mwm-dated-1045246502.d60a79@mired.org>
To:        Daniela <dgw@liwest.at>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Automatically include debug symbols?
Message-ID:  <15942.39589.709632.258724@guru.mired.org>
In-Reply-To: <200302091847.39504.dgw@liwest.at>
References:  <200302091847.39504.dgw@liwest.at>

next in thread | previous in thread | raw e-mail | index | archive | help
In <200302091847.39504.dgw@liwest.at>, Daniela <dgw@liwest.at> typed:
> 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/bsd.port.mk, and removing the "${STRIP}" from
INSTALL_PROGRAM. You also need to change STRIP_CMD to be something
harmless.

> 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
-- 
Mike Meyer <mwm@mired.org>		http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15942.39589.709632.258724>