freebsd-hackers Digest, Vol 588, Issue 1

Benjamin Kaduk bjk at freebsd.org
Wed Jul 30 21:42:15 UTC 2014


On Wed, 30 Jul 2014, Nidal Khalil wrote:

> My kernel is compiled with -g as well. However I am loading a driver
> module. That is compiled with -g but the modules will not load if it is not
> stripped. it is using the objcopy found in bsd.kmod.mk. This is the reason
> that bt or where shows the backtrace but not the local frame symbols.

You can use the objcopy invocation three lines later in kmod.mk to produce 
a mykmod.ko.symbols file to put in /boot/modules/.  Or you could have your 
driver module use bsd.kmod.mk for its build system, so everything will be 
taken care of automatically.

> On the gdb front
> The gdb that came with the distro is 6.1.1 has two problems:
> 1- does not understand -k option
> 2- without -k it does not understand the vmcore file format. Is there a
> utility that will convert a vmcore to a format that gdb understands.  Thanks

I am not sure how many times I need to say it: regular gdb will not work 
with vmcores.  You must use kgdb.  Concentrate your time on getting kgdb 
working for you; ignore regular gdb.

-Ben


More information about the freebsd-hackers mailing list