debug_linux_module_via_gdb
0. 前提
1. 调试linux2.6.34模块
$ mount -t proc proc /proc$ insmod test.ko
$ cat /proc/modules
test 1099 0 - Live 0xffffffffa0000000## terminal A
$ qemu-system-x86_64 xxx -S -s
## terminal B
$ gdb vmlinux
Reading symbols from vmlinux...done.
(gdb) target remote :1234
## 加载模块符号
(gdb) add-symbol-file test.ko 0xffffffffa0000000
Reading symbols from test.ko...done.
(gdb) b call_func
(gdb) c
## terminal A
$ insmod test.ko
## terminal B start to debug linux modules in code level2. 调试linux5.4模块
Last updated