利用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
相关文档:
Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......
一:前言
最近在研究android的sensor driver,主要是E-compass,其中用到了Linux input子系统.在网上也看了很多这方面的资料,感觉还是这篇分析的比较细致透彻,因此转载一下以便自己学习,同时和大家分享!
(这篇博客主要是以键盘驱动为例的,不过讲解的是Linux Input Subsystem,可以仔细的研究一下!)
键盘驱动将检 ......
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 ......
防火墙相应端口没有打开。
打开方法如下:
vi /etc/sysconfig/iptables
加入如下的一行:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT
重启iptables:
/etc/init.d/iptables restart
查看端口是否真的打开:
/etc/init.d/iptables status ......
静态链接库是以.a结尾的文件,一般是用工具将多个.o文件合并到一起组成静态库
动态链接库是以.so结尾的文件,和windows下的dll文件类似。
静态链接库都可以在程序编译过程中用 -L参数来指定他们 -L/opt/lib/XXX.a
动态链接库一般是在LD_LIBRARY_PATH中来指定搜索路径,也可以在 -L/opt/lib 后面加一个 lXX,对应了lib中的XX. ......