开发者

How can I get the value of "%d" variables in dynamic_debug info of Linux kernel?

I enabled config_dynamic_debug=y in the Linux kernel customized by myself, and following the dynamic_debug documentation shipped with kernel source code, I run the following command to enable the output of the debug information in bluetooth subsystem:

echo -n 'file net/bluetooth/bnep/core.c line 722 +p' > /sys/kernel/debug/dynamic_debug/control

which means the debug info in the line 772 of the file net/bluetooth/bnep/core.c will be logged.

After the bnep.ko module is loaded, I checked the output of /sys/kernel/debug/dynamic_debug/control, the debug information is there.

But most of them loo开发者_高级运维k like:

> net/bluetooth/bnep/core.c:422 [bnep]bnep_tx_frame - "skb %p dev %p type %d\012"

I really want to know the value represented by %p or %d, but I don't know how to do it.

Thank you very much!


You have enabled that debug statement, which is what reading from /sys/kernel/debug/dynamic_debug/control tells you.

From now on, that debug message will be sent to the normal kernel log, which you can view with dmesg and/or with your syslog daemon (which will normally log to /var/log/messages or /var/log/everything/, or some similar path).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜