linux内核调试日志开关-让pr_debug输出
来源:互联网 发布:淘宝联盟丢单 编辑:程序博客网 时间:2024/06/05 04:40
http://blog.csdn.net/longxiaowu/article/details/44649371
1、让pr_debug能输出
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -59,7 +59,7 @@
/* We show everything that is MOREimportant than this.. */
#define MINIMUM_CONSOLE_LOGLEVEL 1 /*Minimum loglevel we let people use */
-#define DEFAULT_CONSOLE_LOGLEVEL 7 /*anything MORE serious than KERN_DEBUG */
+#define DEFAULT_CONSOLE_LOGLEVEL 8 /*anything MORE serious than KERN_DEBUG */
int console_printk[4] = {
DEFAULT_CONSOLE_LOGLEVEL, /* console_loglevel */
2、让模块内代码都能输出
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
EXTRA_CFLAGS += -DDEBUG
3、让每个文件输出
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
文件include之前加define DEBUG
或者Makefile里面增加
pr_debug() Some files call pr_debug(), which is ordinarily an empty macro that discards its arguments at compile time. To enable debugging output, build the appropriate file with -DDEBUG by adding CFLAGS_[filename].o := -DDEBUG to the makefile. For example, to see all attempts to spawn a usermode helper (such as /sbin/hotplug), add to lib/Makefile the line: CFLAGS_kobject_uevent.o := -DDEBUG Then boot the new kernel, do something that spawns a usermode helper, and use the "dmesg" command to view the pr_debug() output.
4、内核打印控制
d,lx,ld,,lu,这几个都是输出32位的
hd,hx,hu,这几个都是输出16位数据的,
hhd,hhx,hhu,这几个都是输出8位的,
lld,ll,llu,llx,这几个都是输出64位的,
原文地址:http://blog.csdn.net/piaomiaoju/article/details/35566269
- linux内核调试日志开关-让pr_debug输出
- linux内核调试日志开关-让pr_debug输出
- linux内核如何打开pr_debug调试信息
- 内核调试pr_debug
- Linux内核日志开关
- Linux内核动态调试信息的打开,如pr_debug
- Linux内核动态调试信息的打开,如pr_debug
- Linux内核动态调试信息的打开,如pr_debug .
- Linux内核动态调试信息的打开,如pr_debug
- 动态调试pr_debug
- Linux内核printk日志输出控制
- 如何打开pr_debug调试信息
- 如何打开pr_debug调试信息
- 如何打开pr_debug调试信息
- 如何打开pr_debug调试信息
- 如何打开pr_debug调试信息
- 如何打开pr_debug调试信息
- 如何打开pr_debug调试信息
- poj3061
- Windows Phone页面跳转 导航
- Lua 5.1 API函数(一)
- JVM内存模型和性能优化
- Android 编程下 Eclipse 恢复被删除的文件
- linux内核调试日志开关-让pr_debug输出
- Lua 5.1 API函数(二)
- 类 1
- SQL语句删除和添加外键、主键
- 全局变量和局部变量
- ADO学习(三)Command 对象
- 父类函数调用虚函数
- ndk-stack 学习使用
- 表示层调用控制层,控制层调用业务层,业务层调用数据访问层MVC