[cgl_discussion] Why KDB does not take advantage of Kerntypes
deng.pan at intel.com
Mon Oct 14 17:16:48 PDT 2002
After kerntypes is loaded into kernel, I do not think it is difficult to get
data structure information from it. I check the lcrash code, and it needs
only a small amount of code. Actually, I think KDB can borrow that code from
From: Khalid Aziz [mailto:khalid at fc.hp.com]
Sent: 2002?10?15? 2:19
To: Pan, Deng
Cc: cgl_discussion at lists.osdl.org
Subject: Re: [cgl_discussion] Why KDB does not take advantage of Kerntypes
"Pan, Deng" wrote:
> In KDB, to display a kernel structure(for example, page_t and mm_struct) a
> special kdb module (kdbm_pg.o, kdbm_vm.o)has to be inserted into kernel.
> there are large number of data structure in the kernel, we cannot provide
> module for each of the data structure. Even worse, if the data structure
> the kernel have been changed, the kdb module have to be changed
> Since lcrash have already set a good example, why does KDB not take
> advantage of Kerntypes information?
I doubt situation can change much with kdb. The only way to get kdb to
recognize data structures is to build knowledge of the data structures
inside kdb. This is what you do with the modules. lcrash is a utility
that runs as a user process with full kernel up and running, while kdb
runs with kernel essentially halted. kdb is not a user process either.
This makes it rather difficult to read a Kerntypes like file from within
kdb to get knowledge of data structures into kdb. If kdb is invoked from
a panic path, you can forget about trying to read a file. So the only
option is to make kdb aware of data structures by adding code to it.
There may be a way to use Kerntypes file at kernel compilation time to
import knowledge of data structures into kdb. That could be an
Khalid Aziz Linux and Open Source Lab
khalid at hp.com Fort Collins, CO
"The Linux kernel is subject to relentless development"
- Alessandro Rubini
More information about the cgl_discussion