January 5, 2012

LOAD K MODULE SYMBOL TABLE INTO DEBUGGER

Hi,


scd /sys/module/chra read write/sections
cat .bss .data .text
0xf8e1e830
0xf8e1e6f4
0xf8e1e000
(gdb) add-symbol-file /home/nkhare/Training/LinuxKernel/oops/char-dev-read-write-oop/char-read-write.ko 0xf8e1e000 -s .data 0xf8e1e6f4 -s .bss 0xf8e1e830
add symbol table from file "/home/nkhare/Training/LinuxKernel/oops/char-dev-read-write-oop/char-read-write.ko" at
.text_addr = 0xf8e1e000
.data_addr = 0xf8e1e6f4
.bss_addr = 0xf8e1e830
(y or n) y
Reading symbols from /home/nkhare/Training/LinuxKernel/oops/char-dev-read-write-oop/char-read-write.ko...done.
(gdb) p mycdrv1_read
\$1 = {ssize_t (struct file *, char *, size_t, loff_t *)} 0xf8e1e000
(gdb) list mycdrv1_read

No comments:

Post a Comment