Hello Suresh, I don't think there is difference between v2.6.26 and later in module sections. The address of e1000_rx_checksum is 0xffffffffa0093b59 on v2.6.30.8. I guess something wrong on your .ko file. Have you dumped symbols of your .ko file? -caz
-----Original Message----- From: Suresh P.C [mailto:[email protected]] Sent: Tuesday, September 29, 2009 12:18 AM To: [email protected] Subject: [Kgdb-bugreport] KGDB/GDB problem resolving module functionaddresses v2.6.28 of the kernel seems to have changed the way module sections are created which prevents KGDB/GDB (v6.8) from correctly evaluating the addresses of functions within the module. The problem does not exist with kernel v2.6.26 but the problem exist with kernel 2.6.30 also. Example follows: After I load a module, I can see the module section information in the directory /sys/module/chardev/sections as follows: #ls -a . .symtab .. .text .bss .text.cleanup_module .data .text.device_ioctl .fixup .text.device_open .gnu.linkonce.this_module .text.device_read .note.gnu.build-id .text.device_release .reginfo .text.device_write .rodata.str1.4 .text.init_module .strtab __ex_table # I then add the module symbols to gdb as follows: (gdb) add-symbol file chardev.ko 0xc0745000 -s .data0xc0745e20 -s .bss 0xc0746000 -s .reginfo 0xc0745534 Now when I try to get the address of a function the wrong value is returned i.e. all functions get the same address (gdb) p /x &device_write $1 = 0xc0745000 (gdb) p /x &device_read $2 = 0xc0745000 (gdb) p /x &device_open $3 = 0xc0745000 Tried adding explicitly as follows: (gdb) add-symbol-file ../moduletest/chardev.ko 0xc0745000 -s .reginfo 0xc0745534 -s .data 0xc0745e20 -s .bss 0xc0746000 -s .text.device_open 0xc07450a0 -s .text.device_write 0xc07450a0 -s .text.device_read 0xc07451ac add symbol table from file "../moduletest/chardev.ko" at .text_addr = 0xc0745000 .reginfo_addr = 0xc0745534 .data_addr = 0xc0745e20 .bss_addr = 0xc0746000 .text.device_open_addr = 0xc07450a0 .text.device_write_addr = 0xc07450a0 .text.device_read_addr = 0xc07451ac (y or n) y Reading symbols from /home/suresh/moduletest/chardev.ko...done. (gdb) However, the result is still the same i.e.: (gdb) p /x &device_write $4 = 0xc0745000 (gdb) p /x &device_read $5 = 0xc0745000 (gdb) p /x &device_open $6 = 0xc0745000 Any help/explanation appreciated. Regards, Suresh Connect more, do more and share more with Yahoo! India Mail. Learn more. http://in.overview.mail.yahoo.com/ ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Kgdb-bugreport mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Kgdb-bugreport mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
