Setup kgdb with supported kernel is quite straight forward by following the document. But there do have some small roadblocks, especially when you try to run the Linux as a VM in VMWare server.
- With 2.6.8 or later kernel, you will not see “Waiting for connection from remote gdb…”, as pointed out at here. I was panic for a while when I could not figure out where the kernel stopped at;
- Setup VMWare virtual serial port by following this.
- Tricky: by default, kgdb over serial will use serial port 1 in CONFIG_KGDB_PORT_NUM, which is 2nd serial port. Had better change this to serial port 0, which is 1st serial port. The reason is we, at least I, usually add only 1 serial port in VMWare server…
Notes:
- kdgb cvs 02/07/2007 version can apply cleanly on 2.6.17 and runs ok.
- kgdb latest can be found via “git clone git://www.kernel.org/pub/scm/linux/kernel/git/trini/linux-2.6-kgdb-testing.git”, as of 02/07/07, it is based on 2.6.18
