android linux kernel debug技术

来源:互联网 发布:淘宝api 商品列表接口 编辑:程序博客网 时间:2024/05/21 13:22

动态调试功能就是你可以决定在程序运行过程中是否要 pr_debug(), dev_dbg(), print_hex_dump_debug(), print_hex_dump_bytes() 这些函数正常运行起来。

 

echo –n 'file suspend.c line 340 +p' > /sys/kernel/debug/dynamic_debug/control     让 kernel/power/suspend.c 源码第340行的 pr_debug() 函数打印日志:

echo -n 'file test.c +p' >            /sys/kernel/debug/dynamic_debug/control      让 test.c file 中的pr_debug(),dev_dbg()等函数打印日志:
echo -n 'func test_control -p' > /sys/kernel/debug/dynamic_debug/control            让 test_control 函数打印日志:
echo -n 'module test +p' >    /sys/kernel/debug/dynamic_debug/control                 让 module test中的pr_debug(),dev_dbg()等函数打印日志:

0 0
原创粉丝点击