From owner-freebsd-questions@FreeBSD.ORG Wed Mar 26 14:25:56 2003 Return-Path: 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 0B04637B409 for ; Wed, 26 Mar 2003 14:25:56 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F81743F75 for ; Wed, 26 Mar 2003 14:25:55 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.7/8.12.7) id h2QMPr5x043123; Wed, 26 Mar 2003 16:25:53 -0600 (CST) (envelope-from dan) Date: Wed, 26 Mar 2003 16:25:53 -0600 From: Dan Nelson To: taxman Message-ID: <20030326222553.GA38860@dan.emsphone.com> References: <20030326200449.GB967@bsdsi.homeunix.com> <20030326201149.GE31787@dan.emsphone.com> <200303261710.11281.taxman@acd.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200303261710.11281.taxman@acd.net> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-26.5 required=5.0 tests=AWL,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: FreeBSD Questions Subject: Re: How to produce debugging symbols? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2003 22:25:57 -0000 In the last episode (Mar 26), taxman said: > On Wednesday 26 March 2003 03:11 pm, Dan Nelson wrote: > > If it's your program, recompile and link with the -g commandline > > switch added. If it's a base FreeBSD program (or port), edit the > > Makefile and add a line reading "DEBUG_FLAGS=-g" (this will compile > > with -g and also no strip the debugging symbols when the binary > > gets installed). > > Does this work for the kernel? I'd read that the kernel strips > symbols anyway. If i put makeoptions DEBUG=-g in my kernel config > (as shown in LINT) will I still get the symbols? Thats for 4.x, what > about 5.0 is that different? It still works in 5.0. What ends up happenning is a debugging kernel gets built as kernel.debug, but the stripped version is still installed into /boot/kernel/ (most likely to conserve space on /). When you panic and coredump, copy kernel.debug out of the source tree into /var/crash and use that to debug. -- Dan Nelson dnelson@allantgroup.com