一种很好的程序调试方法!

 

1 #undef PDEBUG
2 #ifdef HELLO_DEBUG
3 #define PDEBUG(fmt, args...) printk (KERN_DEBUG "hello: " fmt, ## args)
4 #else
5 #define PDEBUG(fmt, args...) 
6 #endif

 

使用时,如果将#undef PDEBUG改为#define PDEBUG,程序中的打印语句就会打印出来。

posted @ 2013-04-25 20:29  摩斯电码  阅读(173)  评论(0编辑  收藏  举报