How can I 'getchar()' in module code?

Peter Teoh htmldeveloper at
Wed Dec 4 20:34:18 EST 2013

yes, exactly - what u are describing is called "kdb".   don't mixed up with

kdb:   this is debugging on the same computer - so no serial ports
connection are needed.   once exception occurred, you will be popped into a
special debugger screen.   problem is that now this debugger is running in
kernel mode, inside the same computer that have the kernel module crashing,
and so everything stop running, only kdb is running.

(NOTE:   i played with this almost like 8 or 9 years ago, and it seemed now
kdb is not updated any more.)

kgdb:   this always require TWO computer:   host + debuggee.   kgdb is
running inside the debuggee whose kernel has crashed, and gdb is running in
host.   normally connected via serial port.   normally the preferred way is
to run the kernel to be debugged inside the VirtualBox, or VMWare, and then
gdb host is the virtual machine host.

diff between the two is explained here:

and setup are here (mainly for kgdb):

have fun.

On Tue, Dec 3, 2013 at 8:35 PM, 乃宏周 <naive231 at> wrote:

> For debugging purpose, I want something like 'getchar()' that can pause
> execution in the module code. Do any candidates I can choose?
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at

Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kernelnewbies mailing list