[問題] gdb debug linux module

看板LinuxDev作者 (gigigigi)時間10年前 (2014/07/20 22:56), 編輯推噓2(202)
留言4則, 2人參與, 最新討論串1/1
我步驟 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 // 會出現這樣錯誤 我記得我以前成功過, 請問有人知道原因嗎? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 112.105.143.180 ※ 文章網址: http://www.ptt.cc/bbs/LinuxDev/M.1405868195.A.99A.html

07/22 05:16, , 1F
dmesg有沒有錯誤?
07/22 05:16, 1F

07/22 16:29, , 2F
Alternatively, you can use gdb on a running kernel.
07/22 16:29, 2F

07/22 16:30, , 3F
(read-only; i.e. you cannot change values or set brea
07/22 16:30, 3F

07/22 16:31, , 4F
k points.) reference:README under kernel source
07/22 16:31, 4F
文章代碼(AID): #1JozYZcQ (LinuxDev)
文章代碼(AID): #1JozYZcQ (LinuxDev)