Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2001 11:23:34 -0500
From:      "Matthew Emmerton" <matt@gsicomp.on.ca>
To:        <david@banning.com>, <questions@FreeBSD.ORG>
Subject:   Re: how to make debug kernel with 4.2
Message-ID:  <008501c0a335$24ab3c90$1200a8c0@gsicomp.on.ca>
References:  <200103021549.f22FnPr77908@d.tracker>

next in thread | previous in thread | raw e-mail | index | archive | help
> I am trying to make a debug kernel with 4.2 Stable.
> I went to /usr/src/sys/i386/conf and typed
> # /usr/sbin/config -g MYKERNEL
> and then went to /usr/src and did it the 4.2 way;
> # make buildkernel KERNCONF=MYKERNEL
> # make installkernel KERNCONF=MYKERNEL
>
> Problem is, it doesn't like a debug kernel.  I am told it should be
> around 10 meg size and it's only normal size.

The *installed* kernel will be stripped.  In the compile directory you'll
find a kernel.debug which will be about 10MB.

When you need to debug something (like a kernel crash), you do the
following:

gdb -k
symbol-file /usr/src/compile/MYKERNEL/kernel.debug

And the symbols for the stripped-but-installed kernel will magically appear.

You can find more details about this in the handbook, Chapter 23 (kernel
debugging)

--
Matt Emmerton


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008501c0a335$24ab3c90$1200a8c0>