Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Feb 2005 13:54:04 -0500
From:      Stephan Uphoff <ups@tree.com>
To:        Gerald Heinig <gheinig@syskonnect.de>
Cc:        hackers@freebsd.org
Subject:   Re: Firewire blues
Message-ID:  <1107888844.6309.221.camel@palm.tree.com>
In-Reply-To: <4208B9C2.6020007@syskonnect.de>
References:  <420731DD.3050206@syskonnect.de> <42088232.1030001@syskonnect.de>	 <4208B9C2.6020007@syskonnect.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1107888844.6309.221.camel>