Professional Documents
Culture Documents
4)
make menuconfig
a) Select "KGDB: kernel debugging with remote gdb"
b) select "KGDB: Console messages through gdb"
c) Enter "Serial port number for KGDB" as 0
5)
vi Makefile
append to the EXTRAVERSION = -kgdb
6)
make
#######################################
7)
make modules_install
In "ls /lib/modules" our kernel entry should be there, like 2.6.18-kgdb
8)
make install
9)
Add 'kgdbwait' at the end of the middle line in /etc/grub.conf as follows:
kernel /vmlinuz-2.6.18-kgdb ro root=/dev/VolGroup01/LogVol00 noapic rhgb quiet c
onsole=tty0 console=ttyS0,115200 kgdbwait
10)
scp -r /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64 <development m/c
IP>:/root/home/guest/
11)
copy the module debugging gdb file (gdbmod) to the <development m/c>
untar the file gdbmod
12) on development machine
a) stty ispeed 115200 ospeed 115200 < /dev/ttyS0
b) stty -a -F /dev/ttyS0
12b)
reboot target m/c
13)
On the development m/c:
cd /root/home/guest/linux-2.6.18.x86_64
../gdbmod-x86_64-x86_64 vmlinux
(gdb)target remote /dev/ttyS0
(gdb)detach
14)
On target m/c
a) Compile disksafe driver
b) Copy compilied disksafe drivers folder (/mnt/ds/workspace/disksafe/disksafe.l
inux/drivers) to the development m/c under /root/home/guest
15)
On development m/c
(gdb) set solib-search-path /root/home/guest/drivers/linux/2.6
(gdb)target remote /dev/ttyS0
(gdb)c
16)
Continue testing on target m/c.