首页 > 代码库 > [quote] How to define DEBUG for pr_debug
[quote] How to define DEBUG for pr_debug
Quoted from the https://www.kernel.org/doc/local/pr_debug.txt
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.
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。