From owner-freebsd-stable Wed Mar 14 23:37: 8 2001 Delivered-To: freebsd-stable@freebsd.org Received: from nova.fnal.gov (nova.fnal.gov [131.225.121.207]) by hub.freebsd.org (Postfix) with ESMTP id 9C58637B71A for ; Wed, 14 Mar 2001 23:37:05 -0800 (PST) (envelope-from zingelman@fnal.gov) Received: from localhost (tez@localhost) by nova.fnal.gov (8.9.3+Sun/8.9.3) with ESMTP id BAA15310; Thu, 15 Mar 2001 01:42:28 -0600 (CST) X-Authentication-Warning: nova.fnal.gov: tez owned process doing -bs Date: Thu, 15 Mar 2001 01:42:28 -0600 (CST) From: Tim Zingelman X-Sender: To: Cc: Matt Dillon Subject: Re: can't build 4.3-BETA GENERIC kernel with -g In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 15 Mar 2001, Tim Zingelman wrote: > On Wed, 14 Mar 2001, Matt Dillon wrote: > > > :Am I missing something here... is this the wrong way to build a kernel > > :with debug symbols? Any help is appreciated. > > > > The correct solution is to add the following to your kernel > > configuration file. That is, the file /usr/src/sys/i386/conf/YOURKERNEL, > > NOT make.conf. > > makeoptions DEBUG="-g" > > The result is the same... > > make.conf now has: > CFLAGS= -pipe > COPTFLAGS= -pipe > > and I just removed the # from the line: > makeoptions DEBUG=-g > in /usr/src/sys/i386/conf/GENERIC > It turns out the problem has to do with my having removed the -O from either CFLAGS or COPTFLAGS. I built & installed world/kernel with -O -pipe, then later tried to make kernel with just -pipe and it failed (with or without debug)... I guess if I buildworld with -O I must build my kernel with -O. Is there any problem getting info out of a crashdump if the kernel is compiled -O (along with -g) Now that I've restored the -O, a debug GENERIC builds just fine. I had no idea that I could not mix -O and non -O code... sorry about that. - Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message