From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 8 18:54:31 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8CF416A4CE for ; Tue, 8 Feb 2005 18:54:31 +0000 (GMT) Received: from duchess.speedfactory.net (duchess.speedfactory.net [66.23.201.84]) by mx1.FreeBSD.org (Postfix) with SMTP id BE51C43D49 for ; Tue, 8 Feb 2005 18:54:30 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 24022 invoked by uid 89); 8 Feb 2005 18:54:12 -0000 Received: from duchess.speedfactory.net (66.23.201.84) by duchess.speedfactory.net with SMTP; 8 Feb 2005 18:54:12 -0000 Received: (qmail 23934 invoked by uid 89); 8 Feb 2005 18:54:11 -0000 Received: from unknown (HELO palm.tree.com) (66.23.216.49) by duchess.speedfactory.net with SMTP; 8 Feb 2005 18:54:11 -0000 Received: from [127.0.0.1] (localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id j18Is4w6012851; Tue, 8 Feb 2005 13:54:05 -0500 (EST) (envelope-from ups@tree.com) From: Stephan Uphoff To: Gerald Heinig In-Reply-To: <4208B9C2.6020007@syskonnect.de> References: <420731DD.3050206@syskonnect.de> <42088232.1030001@syskonnect.de> <4208B9C2.6020007@syskonnect.de> Content-Type: text/plain Message-Id: <1107888844.6309.221.camel@palm.tree.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 08 Feb 2005 13:54:04 -0500 Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: Firewire blues X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2005 18:54:31 -0000 On Tue, 2005-02-08 at 08:08, Gerald Heinig wrote: > Gerald Heinig wrote: > >> > >> > >> I recall some issues with gdb and firewire as a module that may or may > >> not be fixed. > >> I recommend to put the dcons into the kernel to avoid any problems. > > > > > > I tried that too. There are a few additional flags that can be set. Of > > particular interest are DCONS_FORCE_CONSOLE and DCONS_FORCE_GDB. I > > presume I should set FORCE_CONSOLE to 1 if I want a console over > > firewire, am I right? > > I'll take a look and see if there are any bugfixes for firewire. > > It turns out that you need to set DCONS_FORCE_CONSOLE to 1 if you want > to have a remote console over firewire. > I've got my link working with firewire now, but unfortunately I still > can't get kgdb to connect. > > If I do the following on the debugging machine: > > kgdb -r /dev/fwmem0.0 kernel.debug > > I get: > > [general gdb stuff] > Switching to remote protocol > get_tty_state failed: Invalid argument > set_tty_state failed: Invalid argument > get_tty_state failed: Invalid argument > set_tty_state failed: Invalid argument > Couldn't establish connection to remote target > Reply contains invalid hex digit 12 > > When doing this, the remote machine's kernel wqas compiled with devices > dcons and dcons_crom and options DCONS_FORCE_GDB=1 > > Any ideas? There are two ways using kgdb to debug a target with firewire. The first way basically replaces the slow serial cable for communication to the remote target gdb stub. The second way uses the remote DMA capabilities of firewire to directly read memory of the target WITHOUT using any debugging software/stub on the target. (Think remote core file) Greg Lehey wrote a nice kernel debugging tutorial that explains both types of firewire debugging. http://www.lemis.com/grog/Papers/Debug-tutorial/tutorial.pdf This should get you started with only minor adjustments (gdb->kgdb) . Stephan