[問題] 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