Re: Hopefully Simple Question on Debugging Kernel Modules

[ Available lists | Index of freebsd-current | Month of Feb 2009 | Week of 23 Feb 2009 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Scott Long <scottl@samsco.org>
Date
23 Feb 2009 18:56:04
Subject
Re: Hopefully Simple Question on Debugging Kernel Modules
Message-ID
49A2F13F.7060407@samsco.org

In reply to
Replies
Referenced by

[ Hide this part ]
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



Elapsed time: 0.119 seconds