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

Randy.Dunlap rddunlap at osdl.org
Mon Oct 14 17:25:28 PDT 2002


On Tue, 15 Oct 2002, Pan, Deng wrote:

| 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
| lcrash.

Like I said earlier, send patches.
That will make it happen more quickly, then we can evaluate it,
and can also send them to the (global) kdb maintainer.

~Randy

| -----Original Message-----
| 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
| information?
|
|
| "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
|
| ====================================================================




More information about the cgl_discussion mailing list