[ale] Debugging kernel modules

Douglas Todd dwt at atlanta.com
Fri Jan 31 16:39:07 EST 1997


Actually, Writing and debugging kernel modules is quite easy.
The kernel has a function call printk, which is a printf type function
call.
The results are written to /var/adm/messages. I use tail to watch the
traces 
of this file.

If you are careful about pointers and array bounds, it is quite possible
to
write a device driver without ever re-booting.

For more information, take a look at the home page under notes from
talks.
There is a paper there that talks about writing and debugging device
drivers.

Perhaps the best ( simple ) example of writing a device driver is lp.c
in the 
kernel source directory. It is well worth studying the interfaces it
uses.

The Kernel Hacking guide is also quite a good reference.



Have fun.

Doug.






Brad Dixon wrote:
> 
> Hello,
> 
> I've got a possible project that is looking at writing some kernel modules
> for linux. Two questions:
> 
> 1) How are modules debugged? Is it especially difficult?
> 
> 2) Is there anything that precludes writing a module in another language,
> say gnat/Ada. It uses the gcc compiler system, so I would assume all the
> object formats are compatable.
> 
> I always try to ask my questions in a small domain first, just to make
> sure someone down the block doesn't know about it already. ALE is great!
> 
> Brad
> 
> --
> Brad Dixon
> Georgia Tech Research Institute -- Atlanta, GA
> bdixon at cmdl.gtri.gatech.edu

-- 
dwt at atlanta.com
doug.todd at sciatl.com






More information about the Ale mailing list