kgdb调试内核模块,无法设置断点
内核原有函数如printk可以设置断点,但调试自己写的模块时一直设置不成功,求大神指教
环境:
系统:CentOS6.4
调试内核:CentOS6.4内核源码
VMware+串口调试
操作如下:
(gdb) add-symbol-file /root/hellomod/hellomod.ko 0xf7e8c000
add symbol table from file "/root/hellomod/hellomod.ko" at
.text_addr = 0xf7e8c000
(y or n) y
Reading symbols from /root/hellomod/hellomod.ko...done.
(gdb) b hello_exit
Breakpoint 5 at 0x24: file /root/hellomod/hellomod.c, line 20.
(gdb) c
Continuing.
Warning:
Cannot insert breakpoint 5.
Error accessing memory address 0x24: Unknown error 4294967295.
月下D思念
11 years, 6 months ago