From owner-freebsd-questions Sun Feb 9 10:15: 5 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FF8D37B401 for ; Sun, 9 Feb 2003 10:15:03 -0800 (PST) Received: from mired.org (ip68-97-54-220.ok.ok.cox.net [68.97.54.220]) by mx1.FreeBSD.org (Postfix) with SMTP id DC10043F93 for ; Sun, 9 Feb 2003 10:15:02 -0800 (PST) (envelope-from mwm-dated-1045246502.d60a79@mired.org) Received: (qmail 16913 invoked from network); 9 Feb 2003 18:15:02 -0000 Received: from localhost.mired.org (HELO guru.mired.org) (127.0.0.1) by localhost.mired.org with SMTP; 9 Feb 2003 18:15:02 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15942.39589.709632.258724@guru.mired.org> Date: Sun, 9 Feb 2003 12:15:01 -0600 To: Daniela Cc: freebsd-questions@freebsd.org Subject: Re: Automatically include debug symbols? In-Reply-To: <200302091847.39504.dgw@liwest.at> References: <200302091847.39504.dgw@liwest.at> X-Mailer: VM 7.07 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: Mike Meyer X-Delivery-Agent: TMDA/0.69 (Count Fleet) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In <200302091847.39504.dgw@liwest.at>, Daniela 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. 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