3.4.3. Bypass lx-symbols
Useless, but a good way to show how hardcore you are. Disable lx-symbols
with:
./run-gdb --no-lxsymbols
From inside guest:
insmod timer.ko cat /proc/modules
as mentioned at:
This will give a line of form:
fops 2327 0 - Live 0xfffffffa00000000
And then tell GDB where the module was loaded with:
Ctrl-C add-symbol-file ../../../rootfs_overlay/x86_64/timer.ko 0xffffffffc0000000 0xffffffffc0000000
Alternatively, if the module panics before you can read /proc/modules
, there is a pr_debug which shows the load address:
echo 8 > /proc/sys/kernel/printk echo 'file kernel/module.c +p' > /sys/kernel/debug/dynamic_debug/control ./linux/myinsmod.out hello.ko
And then search for a line of type:
[ 84.877482] 0xfffffffa00000000 .text
Tested on 4f4749148273c282e80b58c59db1b47049e190bf + 1.