I'm now configuring kgdb with a target pc and a host pc. These 2 PCs are connected via serial cable. The host PC has USB-to-Serial cable which is ttyUSB0. And the target PC has conventional serial port which is ttyS0.
The target PC's BIOS has serial console redirection option so I turned it off.
The Kernel of target PC is built with the following options.
1) CONFIG_HAVE_ARCH_KGDB = y
2) CONFIG_KGDB = y
3) CONFIG_KGDB_SERIAL_CONSOLE = y
And the following is the line of grub.cfg
linux /vmlinuz ro PROMPT_NO nmi_watchdog=1 kgdbwait kgdb8250=/dev/ttyS0,9600,kgdboc=/dev/ttyS0,9600 quiet
I have grub2 installed in this target PC.
I was expecting "Waiting for connection from remote gdb..." message. But it does boot normally without any message.
After booting I checked the /sys/module/kgdboc/parameters/kgdboc and it was empty.