From owner-freebsd-hackers Mon Mar 29 19: 2: 4 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 869F014F64 for ; Mon, 29 Mar 1999 19:01:59 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id MAA28655; Tue, 30 Mar 1999 12:31:38 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id MAA25699; Tue, 30 Mar 1999 12:31:37 +0930 (CST) Message-ID: <19990330123136.H413@lemis.com> Date: Tue, 30 Mar 1999 12:31:36 +0930 From: Greg Lehey To: Archie Cobbs , paul@originative.co.uk Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Debug kernel by default? (was: Taking panic dumps (was: 3.1-S TABLE dies on 40+ connects (resolved))) References: <199903282321.PAA14589@bubba.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <199903282321.PAA14589@bubba.whistle.com>; from Archie Cobbs on Sun, Mar 28, 1999 at 03:21:11PM -0800 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sunday, 28 March 1999 at 15:21:11 -0800, Archie Cobbs wrote: > paul@originative.co.uk writes: >>> Greg Lehey writes: >>>> In that connection, any comments about changing the default way of >>>> building a kernel to create a debug kernel and a stripped copy, and >>>> install the stripped copy? It would require about 10 MB more storage >>>> and a little more time to build the kernel, but since kgdb is useless >>>> without the debug symbols, and disk space is cheap, it seems to me >>>> that it would be worthwhile. >>> >>> Building debug kernels takes up a lot more space, which some people >>> may not have. >>> >>> How about simply fixing 'config -g' to generate a Makefile that >>> does the extra step of copying and stripping the kernel and installing >>> the stripped version kernel.strip instead of kernel? >> >> Unless I misunderstood Greg I think the intention is to always build a debug >> kernel without the user really realising that is happening so that when they >> have a panic they've got the infrastructure there to let the "support team" >> track down the problem. > > [ trimmimg freebsd-net ] Oops, sorry. > Right.. I'm just worried that certain people may object to changing the > behavior to do this automatically (not me by the way). Certain people will object to any change :-) There's a valid point that it uses more memory here, though. >> I think that's a good idea, switch the options around so that by default a >> debug kernel is built and provide an option to build a "production" kernel. >> I don't think a kernel built with -g is going to be significantly slower or >> bigger than a standard kernel once stripped and those after maximum >> performance should know how to go about getting it. > > This is just doing my steps #1 and #2 at the same time, ie: > > Step #1: Fix config -g makefile > Step #2: Make config assume -g by default I think we can do both of these at the same time, as long as we leave a solution for people who really don't have the extra 20 MB (you need space for larger .o files as well). How about this: - make config assume the -g option by default. - add a new option (-s) to config to generate stripped objects. - add a target install.gdb to the Makefile. This target will install the unstripped kernel for people who want to use ddb. - modifiy the existing install target to make a stripped copy of the kernel and to install it. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message