linux kernel driver debug

1. print 

printk(): never

pr_debug(): always good

dev_dbg(): prefered when you have a struct device object

netdev_dbg(): prefered when you have a struct netdevice object

[something]_dbg(): prefered when you have a that something object

2. using file system proc/ memory large file or sequence file

 

3. using Ioctrl to get/set specific data

 

Below shall enable the kernel debug.

4. gdb list command to idenfiy the line of oops

5. addr2line command to identify the line of oops

 

上一篇:CSS复合选择器,全网独家首发!


下一篇:C语言:实验10-10 递归实现顺序输出整数.2021-08-05