LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1746|回复: 0

请教各位高手一个kernel调试的问题

[复制链接]
发表于 2009-11-19 16:55:03 | 显示全部楼层 |阅读模式
我想用kgdb在2.6.16内核下调试自己的module,用了两台虚拟机进行调试。
1. 首先我在开发机上编译了新的2.6.16内核:
make bzImage
make modules
make modules_install
make intall

2. 然后把arch下面的bzImage, 以及System.map,还有通过mkinitrd做出来的initrd.img拷到了调试机上的相应位置

3. 我把开发机2.6.16内核源码目录下面所有的.ko文件拷到了一个/mod目录下。

4. 调试机用新编译的内核启动,然后在开发机上执行
#gdb vmlinux
(gdb) set solib-search-path  /mod/
(gdb) set  remote baud 11520
(gdb) target ........
然后控制调试机启动,
可是在进行了一些初始化之后gdb端就开始显示很多的new threads,这些thread好像是在read 各个module的symbols,但是一直创建了几百个都没有进入完成启动:

以下是(gdb)在所控制调试机器启动之后所显示的部分内容:

。。。。。。。
input: AT Translated Set 2 keyboard as /class/input/input0
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
TCP bic registered
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI No-Shortcut mode
input: ImPS/2 Generic Wheel Mouse as /class/input/input1
ACPI wakeup devices:
USB
ACPI: (supports S0 S1 S4 S5)
Freeing unused kernel memory: 340k freed
Write protecting the kernel read-only data: 360k
Warning: unable to open an initial console.
[New thread 307]
ACPI: PCI Interrupt 0000:02:02.0[A] -> GSI 16 (level, low) -> IRQ 177
ehci_hcd 0000:02:02.0: EHCI Host Controller
ehci_hcd 0000:02:02.0: new USB bus registered, assigned bus number 1
ehci_hcd 0000:02:02.0: irq 177, io mem 0xe8900000
ehci_hcd 0000:02:02.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 6 ports detected
[New thread 309]
[New thread 311]
USB Universal Host Controller Interface driver v2.3
ACPI: PCI Interrupt 0000:00:07.2[D] -> GSI 19 (level, low) -> IRQ 185
uhci_hcd 0000:00:07.2: UHCI Host Controller
uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:07.2: irq 185, io base 0x00001060
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
[New thread 313]
SCSI subsystem initialized
[New thread 315]
[New thread 317]
Fusion MPT base driver 3.03.07
Copyright (c) 1999-2005 LSI Logic Corporation
[New thread 319]
[New thread 321]
Fusion MPT SPI Host driver 3.03.07
ACPI: PCI Interrupt 0000:00:10.0[A] -> GSI 17 (level, low) -> IRQ 193
mptbase: Initiating ioc0 bringup
ioc0: 53C1030: Capabilities={Initiator}
scsi0 : ioc0: LSI53C1030, FwRev=01032920h, Ports=1, MaxQ=128, IRQ=193
  Vendor: VMware,   Model: VMware Virtual S  Rev: 1.0
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 33554432 512-byte hdwr sectors (17180 MB)
sda: Write Protect is off
sda: cache data unavailable
sda: assuming drive cache: write through
SCSI device sda: 33554432 512-byte hdwr sectors (17180 MB)
sda: Write Protect is off
sda: cache data unavailable
sda: assuming drive cache: write through
sda: sda1 sda2
sd 0:0:0:0: Attached scsi disk sda
  Vendor: VMware,   Model: VMware Virtual S  Rev: 1.0
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sdb: 6291456 512-byte hdwr sectors (3221 MB)
sdb: Write Protect is off
sdb: cache data unavailable
sdb: assuming drive cache: write through
SCSI device sdb: 6291456 512-byte hdwr sectors (3221 MB)
sdb: Write Protect is off
sdb: cache data unavailable
sdb: assuming drive cache: write through
sdb: sdb3
sd 0:0:1:0: Attached scsi disk sdb
[New thread 324]
[New thread 327]
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
[New thread 509]
[New thread 510]
[New thread 531]
[New thread 573]
[New thread 698]
[New thread 761]
Remote packet too long: 000000000000000000000000dc208fe72e72656c2e616c74696e737472756374696f6e7300000000000000000000000010bc8fe72e726f646
[New thread 831]
[New thread 812]
[New thread 869]
*[New thread 981]
Remote packet too long: 0000000000000000000000000000000034609ce72e72656c2e657869742e74657874000000000000000000000000000000000000002095e72
Ignoring packet error, continuing...
Remote packet too long: 0000000000000000e4b18fe72e616c74696e7374725f7265706c6163656d656e740000000000000000000000e7b18fe72e657869742e74657
[New thread 1008]
[New thread 1098]
[New thread 1117]
Remote packet too long: 003093e72e746578740000000000000000000000000000000000000000000000000000008c3e96e72e72656c2e746578740000000000000000
Remote packet too long: 000000000c799ae72e64656275675f7075626e616d6573000000000000000000000000000000000050219ce72e72656c2e64656275675f707
[New thread 1207]
Remote packet too long: 00000000000000000000000000000000006080e72e696e69742e7465787400000000000000000000000000000000000000000000108a82e72
[New thread 1223]
Remote packet too long: 61746100000000000000000000000000000000000000000078199ce75f5f6b73796d746162000000000000000000000000000000000000000
[New thread 1226]
Remote packet too long: 0000000000000000f4ac9ae72e657869742e74657874000000000000000000000000000000000000000000002809aae72e72656c2e6578697
[New thread 1231]
[New thread 1234]
[New thread 1237]
Remote packet too long: d4799ee72e72656c2e676e752e6c696e6b6f6e63652e746869735f6d6f64756c6500000080e89ee72e627373000000000000000000000000000
Remote packet too long: 0000000000000000d8378ee72e657869742e746578740000000000000000000000000000000000000000000018d291e72e72656c2e6578697
[New thread 1242]
[New thread 1253]
Remote packet too long: 6573000000000000000000000000000004f4a0e72e64656275675f7075626e616d65730000000000000000000000000000000000dc6ea2e72
[New thread 1264]
Error while mapping shared library sections:
dm_multipath.ko: No such file or directory.
Error while reading shared library symbols:
dm_multipath.ko: No such file or directory.
[New thread 1270]
Error while mapping shared library sections:
dm_mirror.ko: No such file or directory.
Error while reading shared library symbols:
dm_multipath.ko: No such file or directory.
Error while reading shared library symbols:
dm_mirror.ko: No such file or directory.
[New thread 1444]
Remote packet too long: 0000000000000000000000000000000078f6b4e72e72656c2e616c74696e737472756374696f6e730000000000000000000000004041a5e75
Error while reading shared library symbols:
dm_multipath.ko: No such file or directory.
Error while reading shared library symbols:
dm_mirror.ko: No such file or directory.
[New thread 1453]
Remote packet too long: 00000000000000000000000057e4a1e72e64656275675f696e666f0000000000000000000000000000000000000000008c7da7e72e72656c2
Remote packet too long: 0000000024388ee72e726f646174612e737472312e3400000000000000000000000000000000000017398ee72e726f646174612e737472312
Error while reading shared library symbols:
dm_multipath.ko: No such file or directory.
Error while reading shared library symbols:
dm_mirror.ko: No such file or directory.


一直都没有能完成启动。

请各位高手为小弟指点以下,到底哪出了问题? 感激不尽。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表