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

Andy Pfiffer andyp at osdl.org
Mon Oct 14 08:57:56 PDT 2002


On Mon, 2002-10-14 at 02:18, Pan, Deng wrote:
> lcrash takes advantage of the type information in Kerntypes, so it can
> display  detailed information about any kernel structure and print the whole
> structure and any member in the structure. For example, 
> >>whatis task_struct
> >>print *(task_struct*)0xc5436000
> >>print (task_struct*)0xc5436000->uid
> 
> However, in KDB, to access a structure member, we have to use the annoying
> offset, instead of the structure member name. Just like this:
> kdb> md 0xc5436000+0x2c
> 
> 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?
> 
> 
> Pan, Deng 
> Intel China Software Lab 

Hmmm...that doesn't sound like an unreasonable request.  I'll take a
look at it.

Andy





More information about the cgl_discussion mailing list