KGDB connection failure - Please help, I'm desparate!
Peter Craft
craft at alacritech.com
Fri Feb 20 15:54:56 PST 2009
I've been trying for three days to get KGDB to work.
I've followed the instructions here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-online-gdb.html
and here:
http://www.lemis.com/grog/Papers/Debug-tutorial/tutorial.pdf
without success. Specifically, I've rebuilt my kernel with:
makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
..
options KDB
options DDB
options GDB
My "boot.config" file contains -P and my /boot/loader.conf file contains:
hint.sio.0.flags="0x90"
When I issue the "boot -d" on the target, the system breaks in to the "db" prompt
as expected, at which point I enter "gdb" followed by "s". All of which seems to
work perfectly.
On the debugger side I enter kgdb with "kgdb -r /dev/cuad0 -v kernel.debug"
from the build directory and I get:
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout
If I boot the remote system with "set console=comconsole", I'm able to communicate
across the serial line as a console, so I believe that the serial ports and cable are
functioning properly. I just can't get gdb to connect.
Can anyone offer any suggestion on what to try next? Or tips on how to go
about debugging the problem? This is with FreeBSD 7.1.
Thanks in advance,
Pete
More information about the freebsd-questions
mailing list