Hi,

I am using gdb to debug a kernel loadable module.  My kernel version is 
2.6.27-8 and the gdb version is 6.8-29.fc10.  I compiled the kernel with KGDB 
on and boot the kernel with kgdboc.  I can attach the running kernel remotely 
to the gdb during boot and so on.  After the system boot up, I can get the 
module's text address from /proc/modules and load it to the gdb with 
"add-symbols-file e1000.ko  0xff..." (using e1000 driver as an example and I am 
on x86_64 box).  I can set a breakpoint such as e1000_reset, but there is not 
source line shown under the info command:

(kgdb) add-symbol-file drivers/net/e1000/e1000.ko 0xffffffffa00b0000
add symbol table from file "drivers/net/e1000/e1000.ko" at
        .text_addr = 0xffffffffa00b0000
(y or n) y
Reading symbols from 
/home/sxu/src/trunk_0414/kernel/vanilla/drivers/net/e1000/e1000.ko...done.

(kgdb) info b
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0xffffffff8023e833 in sys_kill
                                               at kernel/signal.c:2206
        breakpoint already hit 5 times
2       breakpoint     keep y   0xffffffffa00b2162 <e1000_reset>
                                                                                
                         <=== No source file and line number here

The e1000_reset break can be triggered but I can not see the source code.  I 
tried the "dir" gdb command, but had no luck.

Anyone can advise me to solve this problem?

Thanks in advance.

Stuart



The information in this e-mail and in any attachments is confidential and may 
be privileged.  If you are not the intended recipient, please destroy this 
message, delete any copies held on your systems and notify the sender 
immediately.  You should not retain copy or use this e-mail for any purpose, 
nor disclose all or any part of its content to any other person.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to