[问题] gdb debug linux module

楼主: gigigigi (gigigigi)   2014-07-20 22:56:31
我步骤
cd /sys/module/hello/sections
cat .text .data .bss // 取得 .text .data .bss address
0xbf000000
0xbf0003d5
0xbf0004e0
// 加入gdb
add-symbol-file ../hello_module/hello.ko 0xbf000000 -s .data 0xbf0003d5 -s .bss 0xbf0004e0
https://gist.github.com/anonymous/f999ebaddcc94749b837 // 程式码跟Makefile
(gdb) b hello_exit
Cannot access memory at address 0xbf00002c // 会出现这样错误
我记得我以前成功过, 请问有人知道原因吗?
谢谢
作者: PCIT (冈山的火车￾  N￾ I
dmesg有没有错误?
作者: mimi0213 (提拉米苏好好吃喔)   2014-07-22 16:29:00
Alternatively, you can use gdb on a running kernel.(read-only; i.e. you cannot change values or set break points.) reference:README under kernel source

Links booklink

Contact Us: admin [ a t ] ucptt.com