Date: Mon, 13 Aug 2001 22:30:47 +0200 (CEST) From: volf@oasis.IAEhv.nl (Frank Volf) To: freebsd-hackers@freebsd.org Cc: Rolf Neugebauer <neugebar@dcs.gla.ac.uk> Subject: Re: how to debug a kld module? Message-ID: <20010813203047.C9E2F3E07@drawbridge.oasis.IAEhv.nl> In-Reply-To: <ysqg0awvtug.fsf@therese.dcs.gla.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Rolf Neugebauer wrote: > > My system panics with a page fault in one of my kernel loadable modules. I > > want to debug this, but I can't find a way to load that module and its > > symbol table into gdb. > > > > The steps that I have taken are > > > > gdb -k /sys/compile/DRAWBRIDGE/kernel.debug vmcore.11 > > > > which gives me a normal kenel with debug symbols that I can debug? But, how > > can I load the offending kld module symbol table as well? Or can I only > > properly debug this, when I compile the module into the kernel? > > Try following the steps in the developers handbook: > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html > > In particular the section 11.6 Debugging Loadable Modules Using GDB: > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/x4290.html Thanks, this is very usefull information, so I feel rather stupid to ask the next question. How exactly do I walk the linker_files structure as described in the developers handbook: gdb -k /sys/compile/DRAWBRIDGE/kernel.debug vmcore.13 GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"... IdlePTD 3633152 initial pcb at 2e6600 panicstr: page fault .... (kgdb) print linker_files $1 = -1067722752 (kgdb) print *linker_files $2 = 5 (kgdb) print linker_files->tqh_first Attempt to extract a component of a value that is not a structure pointer. (kgdb) whatis linker_files type = <data variable, no debug info> What am I doing wrong? Frank To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010813203047.C9E2F3E07>