From mboxrd@z Thu Jan 1 00:00:00 1970 From: bernd@petrovitsch.priv.at (Bernd Petrovitsch) Date: Thu, 05 Dec 2013 14:14:52 +0100 Subject: How can I 'getchar()' in module code? In-Reply-To: References: <44408.1386077884@turing-police.cc.vt.edu> <1386080455.9055.28.camel@thorin> Message-ID: <1386249292.9055.113.camel@thorin> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mit, 2013-12-04 at 23:21 +0200, Daniel Baluta wrote: > On Tue, Dec 3, 2013 at 4:20 PM, Bernd Petrovitsch > wrote: > > On Die, 2013-12-03 at 08:38 -0500, Valdis.Kletnieks at vt.edu wrote: > >> 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? > > I think there is a way to stop execution :). Run your image under > qemu, and use gdb to > set breakpoints. Yup. Or you can run UML and use the regular gdb and probably even plain-old getchar() as it runs as a user-space process. The question is, if the interesting parts/drivers/subsystems are there too. Bernd -- Bernd Petrovitsch Email : bernd at petrovitsch.priv.at LUGA : http://www.luga.at