After setting up the testbed, to remotely (serially) debug the kernel
and then applying the breakpoints, kernel execution does not stop at
the breatpoint.
Below are the steps :
I compiled the kernel 2.6.8 after applying the kgdb patch and made a
set up to remotely debug the kernel mdule. I used gdbmod (available at
http://kgdb.linsyssoft.com) on development machine to connect to the
target machine as shown below.
/*********************************************************************/
[root@vishalsoni linux-2.6.8]# gdbmod vmlinux
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
breakpoint () at kernel/kgdb.c:1212
1212 atomic_set(&kgdb_setting_breakpoint, 0);
(gdb)
/*********************************************************************/
To let GDB know where module files are located, i set GDB variable
solib-search-path
/*********************************************************************/
(gdb) set solib-search-path /home/vishal/products/tot_driver/
/*********************************************************************/
and then i did insmod on target to load the kernel module and checked
the output of /proc/modules