pr_debug on dmesg
If we pr_debug , then it shows the base address to which the module was loaded.
This can be useful, for example, if a module panics in init_module , and you cannot read /proc/modules interactively.
The best way to enable pr_debug is to compile the kernel with CONFIG_DYNAMIC_DEBUG=y , as described in: Why doesn't the Linux kernel pr_debug give any output?
Then when you do:
echo 8 > /proc/sys/kernel/printk echo 'file kernel/module.c +p' > /sys/kernel/debug/dynamic_debug/control insmod mymodule.ko
we see a line of the form:
0xffffffffc0005000 .text
which contains the base address.
Ciro Santilli ๅ
ๅญ ้ฒ ๅฎช ๅ
ญๅ ไบไปถ ๆณ่ฝฎๅ
source share