From owner-freebsd-questions@FreeBSD.ORG Fri Feb 20 23:54:56 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABEE3106566B for ; Fri, 20 Feb 2009 23:54:56 +0000 (UTC) (envelope-from craft@alacritech.com) Received: from smtp184.sat.emailsrvr.com (smtp184.sat.emailsrvr.com [66.216.121.184]) by mx1.freebsd.org (Postfix) with ESMTP id 7B1948FC17 for ; Fri, 20 Feb 2009 23:54:56 +0000 (UTC) (envelope-from craft@alacritech.com) Received: from relay8.relay.sat.mlsrvr.com (localhost [127.0.0.1]) by relay8.relay.sat.mlsrvr.com (SMTP Server) with ESMTP id F01AC1F78B6; Fri, 20 Feb 2009 18:28:06 -0500 (EST) Received: by relay8.relay.sat.mlsrvr.com (Authenticated sender: craft-AT-alacritech.com) with ESMTPSA id BE7071ED7DA for ; Fri, 20 Feb 2009 18:28:06 -0500 (EST) Message-ID: <060701c993b2$e32c41c0$510a010a@alacritech.com> From: "Peter Craft" To: Date: Fri, 20 Feb 2009 15:28:07 -0800 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: KGDB connection failure - Please help, I'm desparate! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2009 23:54:56 -0000 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