Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Feb 2009 15:28:07 -0800
From:      "Peter Craft" <craft@alacritech.com>
To:        <freebsd-questions@freebsd.org>
Subject:   KGDB connection failure - Please help, I'm desparate!
Message-ID:  <060701c993b2$e32c41c0$510a010a@alacritech.com>

next in thread | raw e-mail | index | archive | help

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/kern=
eldebug-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=3D-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=3D"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=3Dcomconsole", 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?060701c993b2$e32c41c0$510a010a>