Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2009 11:55:59 -0700
From:      Scott Long <scottl@samsco.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, David Christensen <davidch@broadcom.com>, John Baldwin <jhb@FreeBSD.org>
Subject:   Re: Hopefully Simple Question on Debugging Kernel Modules
Message-ID:  <49A2F13F.7060407@samsco.org>
In-Reply-To: <49A2F01E.4080409@FreeBSD.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49A2F13F.7060407>