From owner-freebsd-current@FreeBSD.ORG Mon Feb 23 18:56:04 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FDC210659B9; Mon, 23 Feb 2009 18:56:04 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id C35C78FC1B; Mon, 23 Feb 2009 18:56:03 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n1NItxVd033437; Mon, 23 Feb 2009 11:55:59 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <49A2F13F.7060407@samsco.org> Date: Mon, 23 Feb 2009 11:55:59 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Doug Barton References: <5D267A3F22FD854F8F48B3D2B5238193394588D54D@IRVEXCHCCR01.corp.ad.broadcom.com> <200902231119.54925.jhb@freebsd.org> <49A2D86F.1000509@samsco.org> <200902231257.28060.jhb@freebsd.org> <49A2E3FE.2070106@samsco.org> <49A2F01E.4080409@FreeBSD.org> In-Reply-To: <49A2F01E.4080409@FreeBSD.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-current@FreeBSD.org, David Christensen , John Baldwin Subject: Re: Hopefully Simple Question on Debugging Kernel Modules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2009 18:56:06 -0000 Doug Barton wrote: > Scott Long wrote: >> Ah, I was still using 'CFLAGS+= -g". Thanks to you and Mr. Campbell for >> the tip. > > IME in order to make sure I get debug symbols in everything (base and > ports) I need to include both of these: > > CFLAGS+= -ggdb > DEBUG_FLAGS+= -ggdb > > BTW, I've always used -ggdb out of habit, is using just -g preferable > for some reason? > > > hope this I helps, > > Doug > Never heard of -ggdb =-) One other tip is to compile with -O0 or -fno_inline so that kdb doesn't get fooled by all of the foolish auto-inlining that gcc wants to do. gdb is able to handle it, but I still find it a good practice to do. Scott