最近在尝试利用kgdb+vmware来调试无线网卡驱动模块
(gdb) add-symbol-file /home/rt73-cvs-2008032505/Module/rt73.ko 3503194112//1 在加载模块前就设置断点
add symbol table from file "/home/rt73-cvs-2008032505/Module/rt73.ko" at
.text_addr = 0xd0ce8000
(y or n) y
Reading symbols from /home/rt73-cvs-2008032505/Module/rt73.ko...done.
(gdb) break rtmp_main.c:2382
Breakpoint 2 at 0xd0ce8000: file /home/rt73-cvs-2008032505/Module/rtmp_main.c, line 2382.//成功设置断点
(gdb) c
Continuing.
Warning:
Cannot insert breakpoint 2.
Error accessing memory address 0xd0ce8000: 未知的错误 4294967295.//插不进去 这里不停报错 程序也不走了
(gdb) dis 2//只好把断点取消
(gdb) c
Continuing.//好了 继续
//gdb控制模式
(gdb) break module.c:1878
Breakpoint 3 at 0xc013b00d: file kernel/module.c, line 1878.
(gdb) c
Continuing.//target端执行insmod rt73.ko 停下
[New thread 1356]
[Switching to thread 1356]
Breakpoint 3, sys_init_module (umod=0xb775a008, len=2605028,
uargs=0x804a008 "") at kernel/module.c:1882
1882 {
(gdb) break rtmp_main.c:2382//再试一次
Note: breakpoint 2 (disabled) also set at pc 0xd0ce8000.//刚才失效的断点 不管了
Breakpoint 4 at 0xd0ce8000: file /home/rt73-cvs-2008032505/Module/rtmp_main.c, line 2382.
(gdb) c
Continuing.
Warning:
Cannot insert breakpoint 4.
Error accessing memory address 0xd0ce8000: 未知的错误 4294967295.//又来了 还是过不去
(gdb) c
Continuing.
Warning:
Cannot insert breakpoint 4.
Error accessing memory address 0xd0ce8000: 未知的错误 4294967295.
(gdb) dis 4//取消就好了
(gdb) c
Continuing.
[New thread 1369]
[Switching to thread 1369]
Breakpoint 3, sys_init_module (umod=0xb775c008, len=2674686,
uargs=0x804a008 "") at kernel/module.c:1882
1882 {
(gdb) c
Continuing.
我的问题:我尝试把host端的rt73.ko直接铐到target端并插入 提示:模块格式错误 插不进去
没办法 只好在target端再重新编译 install 加载
于是就出现上面的问题 只要一设置断点 就会不停的报错:Error accessing memory address 0xd0ce8000: 未知的错误 4294967295.
大家帮我看一下 到底该怎么解决 谢谢!!!!!!!(6)m:b
salvage 于 2008-05-09 22:21:17发表:
不过这样只能看到init和exit函数
其他的都看不到
晕死
salvage 于 2008-05-06 23:52:38发表:
ok 搞定
http://blog.chinaunix.net/u1/51634/showart_405828.html
参考了这里
原来是add-symbol-file信息给的太少
呵呵