[cgl_discussion] Why KDB does not take advantage of Kerntypes information?

Khalid Aziz khalid at fc.hp.com
Mon Oct 14 11:19:29 PDT 2002


"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.
> Since
> there are large number of data structure in the kernel, we cannot provide a
> module for each of the data structure. Even worse, if the data structure in
> the kernel have been changed, the kdb module have to be changed accordingly.
> 
> 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
interesting project.

--
Khalid 

====================================================================
Khalid Aziz                                Linux and Open Source Lab
(970)898-9214                                        Hewlett-Packard
khalid at hp.com                                       Fort Collins, CO

"The Linux kernel is subject to relentless development" 
				- Alessandro Rubini



More information about the cgl_discussion mailing list