Regarding KGDB setup over serial cable

Vivek Panwar vivekpanwar2008 at gmail.com
Mon Oct 15 07:10:14 EDT 2012


Hi All,

I am making a setup for kernel debugging over Null modem serial cable , i
am trying to make it work on x86 arch machine.I have a straight serial DB9
cable(Having both female ports) which i converted into NULL MODEM CABLE bye
doing below rework:

*Pin of port #1....goes to....Pin of port #2
2 RxD       <------------->   TxD 3
3 TxD       <------------->   RxD 2
5 GND       <------------->   GND 5

Please check pin connections ones and let me know if i am doing wrong.

I have connected NULL MODEM serial (both female port) cable between two
machines via USB to serial coverter cable.I have check the connection
between two machine through MINICOM and its works fine.Till this point i
didnt face any issue , now lets come to the next point.


*
1) Download stable kernel 3.4.9 (kernel having inbuilt KGDB support)

2) run make menuconfig command and did the below changes to enable KGDB

      a)  CONFIG_HAVE_ARCH_KGDB=y
      b)  CONFIG_KGDB=y
      c)  CONFIG_KGDB_SERIAL_CONSOLE=y*

*3) compiled the kernel image successfully *

*4) make modules

5) make modules_install

6) make install

7) update grub

Below is the grub update detail from grub.cfg file in which i have added
following rule  for the kernel to wait for the GDB connection establish :
*kgdbwait kgdb8250=ttyUSB0,115200,kgdboc=ttyUSB0,115200*

    menuentry 'Ubuntu, with Linux 3.4.9' --class ubuntu --class gnu-linux
--class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos1)'
    search --no-floppy --fs-uuid --set=root
6ef7b91e-7416-4908-97ba-bfb212081a68
    linux    /boot/vmlinuz-3.4.9 root=/dev/sda1 ro   quiet splash
vt.handoff=7 *kgdbwait kgdb8250=ttyUSB0,115200,kgdboc=ttyUSB0,115200*
}

Booted my machine with the above kernel but i am getting kernel panic not
the below message which we expected to get

waiting for gdb connection ........

Please suggest me the right procedure for make this set up work , i am very
new to Linux.

Thanks in advance

Thanks
Vivek
**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121015/24c4dfbb/attachment-0001.html 


More information about the Kernelnewbies mailing list