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

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Tue Dec 3 08:38:04 EST 2013


On Tue, 03 Dec 2013 20:35:41 +0800, 乃宏周 said:

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

The problem is that pausing execution in module code is dangerous, as if
you hold any locks or anything like that, you can hang other threads or
even the whole machine.

You probablhy want to be looking at the kgdb support, that is coded to
work around a lot of the issues and you get full GDB support not just a
getchar() pause.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131203/a4fdc09b/attachment-0001.bin 


More information about the Kernelnewbies mailing list