android linux kernel debug技术

    xiaoxiao2026-04-23  7

    动态调试功能就是你可以决定在程序运行过程中是否要 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()等函数打印日志:

    转载请注明原文地址: https://ju.6miu.com/read-1309139.html
    最新回复(0)