Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 2010 08:16:11 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org, Alexander Fiveg <pebu3op@googlemail.com>
Cc:        doc@freebsd.org
Subject:   Re: Debugging Loadable Modules Using GDB
Message-ID:  <201008300816.11278.jhb@freebsd.org>
In-Reply-To: <20100827201140.GA2812@debmaster-laptop>
References:  <20100827201140.GA2812@debmaster-laptop>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, August 27, 2010 4:11:41 pm Alexander Fiveg wrote:
> Hi,
> from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modules Using
> GDB":
> "...
> (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0
> ...
> "
> Actually I couldn't debug my modules using .ko-file. Moreover, I've find out 
that .ko files do not contain sections with debugging info. With .kld-file 
debugging works out. Do I something incorrectly or the info in the Developers 
Book is outdated?

With newer versions of kgdb you shouldn't need to manually invoke 'add-symbol-
file'.  Kernel modules are treated as shared libraries and should 
automatically be loaded.  Try using 'info sharedlibrary' to see the list of 
kernel modules and if symbols for them are loaded already.

-- 
John Baldwin



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