利用KGDB调试Linux kernel
创建时间:2010-01-27
作者:Steven Yang
E-mail:mqyoung@gmail.com
为了高效的对kernel进行调试,作者在实验室利用已有的资源进行环境配置。首先是硬件环境,我有两个PC,
一个是P III,Debian(Target)
一个是AMD 64,Ubuntu(Developer)
要通过Developer调试Target,这就需要给Target重编内核,并进行串口调试相关设置,而Developer需要装一个32位的虚拟机用作调试。如下为详细的配置过程。
1 KGDB Introduction
KGDB is a debugger for the Linux kernel. It requires two machines
that are connected via a serial connection. The serial connection may
either be an RS-232 interface using a null modem cable, or via the
UDP/IP networking protocol (KGDB over Ethernet, KGDBoE).
KGDB was originally implemented as a patch to Linux kernel, but it has
been included in the official kernel in 2.6.26. The target machine (the
one being debugged) runs the patched kernel and the other (host)
machine runs gdb. The GDB remote protocol is used between the two
machines.
KGDB is available for the following architectures: x86, x86-64, PowerPC, ARM, MIPS, and S390.
It is free software released under the terms of the GNU General Public
License. Until 2006 kgdb was maintained by Linsyssoft Technologies.,
after which Jason Wessel at Wind River Systems, Inc. took over as the
official maintainer.
Ingo Molnar and Jason Wessel created a slimmed-down and cleaned up
version of KGDB which was called "kgdb light" (without Ethernet support
and many other hacks). This was the one merged into the 2.6.26
kernel.[1] The version of kgdb in the 2.6.26 kernel supports only rs232
using a driver which can split debugger inputs and console inputs such
that only a single rs232 port is required.
Jason Wessel created a kgdb test suite which was merged into the 2.6.26
kernel in order to regression test the kgdb core as well as to aid in
the validation of future architecture support for kgdb.
from: http://en.wikipedia.org/wiki/KGDB
Refer: http://kgdb.linsyssoft.co
相关文档:
1. 进入到vim的安装目录,一般为 /usr/share/vim/vim70/
, 或类似 /usr/share/vim/vim??
/;
2. 如果有 .vimrc.vim
文件,查找到该文件中的如下内容:
if has("vms")
set
nobackup " do not keep a backup file, use versions instead
else
set
backup " keep a backup f ......
1. /proc/sys/net/core/rmem_max — 最大的TCP数据接收缓冲
2. /proc/sys/net/core/wmem_max — 最大的TCP数据发送缓冲
3. /proc/sys/net/ipv4/tcp_timestamps — 时间戳在(请参考RFC 1323)TCP的包头增加12个字节
4. /proc/sys/net/ipv4/tcp_sack — 有选择的应答
5. /proc/sys/net/ipv4/tcp_windo ......
www.csdn.net
www.linux.org
www.chinaunix.net
http://www.loveunix.net/
http://www.linuxsir.org/main/
http://www.linuxforum.net/
http://www.codeproject.com/
http://www.codeplex.com/
http://sourceforge.net/
python:
http://www.python.org/
agile:
http://www.thoughtworks.com/ ......