DragonFly BSD
DragonFly kernel List (threaded) for 2005-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: network02.patch - MPSAFE network interrupt

To: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
From: Hiten Pandya <hmp@xxxxxxxxxxxxx>
Date: Tue, 29 Nov 2005 06:41:24 +0000

ane.com> <438b7af2$0$741$415eb37d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <200511290110.jAT1AIke082429@xxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <200511290110.jAT1AIke082429@xxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 42
X-Trace: 1133246440 crater_reader.dragonflybsd.org 742
Xref: crater_reader.dragonflybsd.org dragonfly.kernel:9299

Matthew Dillon wrote:
> :Unfortunately the calling function isn't shown properly in gdb:
>     It looks like its loaded from a module.  What modules do you have
>     loadde?
> 					-Matt

Late entry, but it should help.  The asf(8) utility can help
people to retrieve symbols from kernel modules.  It works by using
the output of the kldstat(8) command from a vmcore.

Put the following file into your home directory as ".gdbinit":

	# fetch http://leaf.dragonflybsd.org/~hmp/dot.gdbinit
	# mv dot.gdbinit ~/.gdbinit

Once you have that file in the right place, reload your gdb session
and type 'kldstat' inside it.  The output of that gdb command should
be identical to that of the real kldstat(8) utility.  Save the output
of the previous action into a a file; we refer to it as "some-file"

Next step is to invoke the asf(8) utility.  The job of this program
is to generate a gdb command file with the right start addresses for
loading the debug-enabled KLD files:

	# cat some-file | asf -f -s -x /path-to-modules asf.out
	# gdb -k -q /path-to-kernel /path-to-core
	(kgdb) source asf.out
	(kgdb) bt

Provided asf(8) finds your modules, this will give correct start
addresses for loading the kernel modules symbols.  I have been
meaning to outline this for a while now, finally got the chance.

I am pretty sure I haven't missed any vital steps, so if this works
please do provide a verification for others.


Hiten Pandya

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]