debug tips
Contents
Q: What’s the code i40e_xmit_frame_ring+0x5667/0x5d50 related
A: Please install debuginfo for the kernel that was running and provide the following output
|
|
But for buildin functions which don’t have .ko.debug file, just use vmlinux file, e.g.
|
|
Q: how to print pr_debug info
A: Usually you should able to print it when DEBUG
defined. just
echo 8 > /proc/sys/kernel/printk
should be enough.
See printk for more info.
Q: Dynamic debug
A: When your kernel has config “CONFIG_DYNAMIC_DEBUG=y”, pr_debug
will not print anything by default. You need to use /sys/kernel/debug/dynamic_debug/control
to control the pr_debug
info.
cat /sys/kernel/debug/dynamic_debug/control
could show all the dynamic debug lines. The control format looks like "file:line [module]function flags format"
e.g.
- Open file’s dynamic debug
|
|
- “+” add the given flags
- “-” remove the given flags
- “=” set the flags to the given flags
- p enables the pr_debug() callsite.
- f Include the function name in the printed message
- l Include line number in the printed message
- m Include module name in the printed message
- t Include thread ID in messages not generated from interrupt context
- _ No flags are set. (Or’d with others on input)
- Enable module’s dynamic debuginfo
|
|
- Use line number
|
|
- enable function debugs
|
|
For more usage info, see Dynamic debug.
Author Hangbin Liu
LastMod 2021-07-15 (132542b)