The setup required for
running KGDB over a serial line is described below. KGDB over ethernet
doesn't require this setup.
Connect the machines using a null-modem cable. A null-modem cable is a
3 wire cable connecting serial ports of the machines. It has DB9 or DB25
connectors at the end to be plugged into serial ports. Connections with
for DB25 connectors at both the ends are shown below.
Connector 1 pins - Connector 2 pins
2 (TxD) - 3
3 (RxD) - 2 (TxD)
7 (GND) - 7 (GND)
Serial line transmission rate
ports support transmission rates from 110 baud to 115200 baud.
Baud rates supported by a serial port depends on the chipset used for
the serial port. Default baud rate for a serial port is 9600. Higher
baud rates result in faster communication between a test kernel and gdb,
hence are preferred over lower baud rates. A serial port may support
supports all these rates, the null-modem cable may not be able to
support them. It is recommended that you check the maximum speed
supported by the serial port and the null-modem cable and use it for
kgdb. For doing analysis of threads from gdb, a baud rate of 115200 is
recommended as lower rates require a long time to get a list of threads
from a test kernel.