How to debug a put kernel component?
From a debugging viewpoint, the kernel is an unique "procedure", distinctive from the customer room procedures, which connect with the kernel using a type of rpc device (syscalls) or mapped memory.
I do not assume you can see the kernel is data structure merely by evaluating some arbitrary customer procedure.
An additional trouble is, that every customer room procedure (consisting of the debugger) requires the kernel to run and also to connect with the customers ; I do not assume you can simply stop the kernel and also think that the debugger will certainly remain to run.
So you require to run GDB on a 2nd equipment, which is what is called Kernel debugging.
Please describe (http://kgdb.linsyssoft.com/, Documentation/sh/kgdb) for even more information.