1394 (Firewire) Debugging with WinDBG

I do have one minor excuse for my recent posting frequency: the blog engine that my hosting provider runs, .Text, is Older Than God™, and has eaten over 1/2 of my recent posts. That, combined with the fact that I have to post from Firefox because every build of Safari (Mac’s default web browser) in the last year has crashed and burned on the .Text editing screen, has resulted in such amazing frustration that I just don’t post as often as I want to. I hear from Susan Bradley, the MVP who runs this server, that we will be going to Community Server soon. Woohoo!

I spent the day troubleshooting a crashing driver. A shipping crashing driver. The best part is that this driver only crashes in the context of another third-party driver that seems to be shipping on every Toshiba laptop built in the last year. Naturally, we lack source code to that driver, and by the time the system crashes, we’re staring at a random page fault in a far-off place, with the third-party driver at the top of the stack. We know only that neither driver can be made to crash without the other, and that when put together, a crash is immediate and ugly. Well, that’s something, I guess.

It did provide me with a reason to try out some technologies that I’ve been late in playing with, though. The crashing laptop has a firewire port but not a com port, and as I have only one usb-serial converter, I was forced into trying out firewire debugging. It was a snap to set up and was a lot faster than com, even at 115,200 bps. I know that several people that know of what they speak have declared firewire debugging to be unusable, but I love it. The cable was a bit on the expensive side (*why* do cables have to cost so much? Lord…), but otherwise this has been a 100% postitive experience.

To set firewire up, you need to first ascertain what kind of cable to buy – there are two types of connector out there, and it’s easy to buy the wrong one. My Mac laptop and my PC desktop have one type, and my PC laptop has the other. Don’t guess wrong. Then again, what kind of idiot would guess wrong? [blushes briefly]

The target is set up similarly to a serial target, except you set /DEBUGPORT=1394 and /CHANNEL={something; i use 0} in place of comX and /BAUDRATE. To connect from the host, simply pick the 1394 tab and enter the chosen channel.

There are more details available in this presentation from Microsoft, and of course in the WinDBG manual.

Happy debugging!

2 Replies to “1394 (Firewire) Debugging with WinDBG”

  1. Wow, I cry like a baby whenever I’m reduced to serial ports. Firewire for WinDbg is da bomb.

    The one trick to using firewire is that windbg seems to be a somewhat hardware-sensitive. Windbg, at least older versions, wouldn’t work with some firewire chips/cards. So I’ve found some firewire cards that I know work, and install these in the target system — even if the target system already has firewire.

    I haven’t tried this with laptops, though… I don’t know if a firewire PC card works at all…

  2. My two laptops use an "OHCI Compliant IEEE 1394 Host Controller / manufacturer IEEE 1394 OHCI Compliant Host Controller Vendor" and a "Texas Instruments OHCI Compliant IEEE 1394 Host Controller / manufacturer Texas Instruments" and I haven’t had any problems doing 1394 debugging. For reference, the laptops in question are Dells, an Inspiron 9300 and an Inspiron 8500.

    Some more points about 1394 debugging:

    – The first time you are running WinDbg/kd in 1394 mode on your debugger PC, you need to run WinDbg/kd as an Administrator because it has to install a special 1394 driver. Subsequent uses work fine as a limited user.

    – 1394 debugging disables the 1394 port on the target computer much like serial, which is a pain if you use 1394 for networking or an external HD (like I do).

Leave a Reply

Your email address will not be published. Required fields are marked *