From: Clay on
I routinely use Windbg with an Ajays USB cable to kernel debug our systems.
We have been running 32 bit windows 7 Pro.

Recently we have decided to move our systems up to 64bit windows 7 Pro and
now I'm having allot of trouble in Windbg.

Here are the version details:

Host running Windbg
Windows 7 Enterprise
Core 2 Duo CPU P9700 @2.80GHz
8GB ram
64-bit Operating System
WinDbg:6.12.0002.633 AMD64

Target
Windows 7 Professional
Core 2 Duo CPU U9300 @1.20GHz
4GB ram
64-bit Operating System
Intel ICH9 chipset

I have tried different USB ports on my host machine, different Ajays cables,
and different target machines all with similar results.


The most consistent problem is with single stepping.

Using WinDbg, I can break in to the target, open a source file and set a
breakpoint (the line turns red), then continue running.

When the target system reaches the breakpoint Windbg breaks as I would
expect. This is very dependable and consistent. I've never had an issue
setting a breakpoint and getting the break.

But if I want to single step the code, I might get 1 or 2 single steps, or
it might delay an abnormally long time between steps, but most often, Windbg
and the target system just stop responding.

If I unplug and replug the Ajays from the Target computer it will sometimes
recover, but it's undependable and I shouldn't have to do that in the first
place.

I used Ctl-Alt-D in Windbg to do a Protocol trace and here is what I got


1: kd> t
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800000,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=110, PacketId=80800000,
READ: Received Type 2 data packet with id = 80800000 successfully.

DbgKdReadControlSpace returns 00000000
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800001,
READ: Received correct ACK packet.
DbgKdContinue(10001,10001) returns 00000000
READ: Wait for type 7 packet
PacketType=7, ByteCount=f0, PacketId=80800001,
READ: Received Type 7 data packet with id = 80800001 successfully.

READ: Packet type = 7, KdApi64 = 1
>>> State change event 3030, proc 1 of 2, str '<empty>'
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800000,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=39, PacketId=80800000,
READ: Received Type 2 data packet with id = 80800000 successfully.

KdReadVirtual(fffff800`02c89bad, 1) returns 00000000, 1
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800001,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=38, PacketId=80800001,
READ: Received Type 2 data packet with id = 80800001 successfully.

DbgKdWriteBreakPoint(fffff880`03b9355f) returns 00000000, 1
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800000,
READ: Received correct ACK packet.
DbgKdContinue(10001,10001) returns 00000000
READ: Wait for type 7 packet
PacketType=7, ByteCount=f0, PacketId=80800000,
READ: Received Type 7 data packet with id = 80800000 successfully.

READ: Packet type = 7, KdApi64 = 1
>>> State change event 3030, proc 1 of 2, str '<empty>'
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800001,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=38, PacketId=80800001,
READ: Received Type 2 data packet with id = 80800001 successfully.

DbgKdRestoreBreakPoint(1) returns 00000000
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800000,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=39, PacketId=80800000,
READ: Received Type 2 data packet with id = 80800000 successfully.

KdReadVirtual(fffff800`02c89bad, 1) returns 00000000, 1
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800001,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=38, PacketId=80800001,
READ: Received Type 2 data packet with id = 80800001 successfully.

DbgKdWriteBreakPoint(fffff880`03b9355f) returns 00000000, 1
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800000,
READ: Received correct ACK packet.
DbgKdContinue(10001,10001) returns 00000000
READ: Wait for type 7 packet
PacketType=7, ByteCount=f0, PacketId=80800000,
READ: Received Type 7 data packet with id = 80800000 successfully.

READ: Packet type = 7, KdApi64 = 1
>>> State change event 3030, proc 1 of 2, str '<empty>'
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800001,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=38, PacketId=80800001,
READ: Received Type 2 data packet with id = 80800001 successfully.

DbgKdRestoreBreakPoint(1) returns 00000000
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800000,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=39, PacketId=80800000,
READ: Received Type 2 data packet with id = 80800000 successfully.

KdReadVirtual(fffff800`02c89bad, 1) returns 00000000, 1
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800001,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=38, PacketId=80800001,
READ: Received Type 2 data packet with id = 80800001 successfully.

DbgKdWriteBreakPoint(fffff880`03b9355f) returns 00000000, 1
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800000,
READ: Received correct ACK packet.
DbgKdContinue(10001,10001) returns 00000000
READ: Wait for type 7 packet
PacketType=7, ByteCount=f0, PacketId=80800000,
READ: Received Type 7 data packet with id = 80800000 successfully.

READ: Packet type = 7, KdApi64 = 1
>>> State change event 3030, proc 1 of 2, str '<empty>'
WRITE: Write type 2 packet
READ: Wait for ACK packet
READ: Received INVALID packet type.
READ: Received INVALID packet type.
READ: Received INVALID packet type.
READ: Received INVALID packet type.
READ: Received INVALID packet type.
READ: Received INVALID packet type.








This time I waited for 5 minutes and continued reciving "INVALID packet
type" messages over and over.

I unplugged and replugged once with no effect, then the second time I got
back into Windbg and got the following messages:






>>>> WriteAll(0x80070002,0x00000001,72,0) fails.
>>>> WriteAll(0x80070002,0x00000001,72,0) fails.
>>>> WriteAll(0x80070002,0x00000001,72,0) fails.
USB2: Write opened
READ: Wait for ACK packet
READ: Data ByteCount error (short read) d, 10.
PacketType=7, ByteCount=f0, PacketId=80800000,
READ: Received Data packet with unmatched ID = 80800000 (expected 80800001)
PacketType=5, ByteCount=0, PacketId=0,
READ: Received RESEND packet
READ: Target requests resend.
WRITE: Wait for ACK failed. Resend Packet.
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800001,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=38, PacketId=80800001,
READ: Received Type 2 data packet with id = 80800001 successfully.

DbgKdRestoreBreakPoint(1) returns 00000000
WRITE: Write type 2 packet
READ: Wait for ACK packet
PacketType=4, ByteCount=0, PacketId=80800000,
READ: Received correct ACK packet.
READ: Wait for type 2 packet
PacketType=2, ByteCount=39, PacketId=80800000,
READ: Received Type 2 data packet with id = 80800000 successfully.

<<Clipped for brevity>>