Extremely slow debugging of 64-bit target in 32-bit debugger

Hi all,

this problem has been bothering me for quite a while.

I have 32-bit Windows 7 on my workstation, with Windbg version 6.12.002.633. I use kernel debugging for VMWARE. In virtual machine, there is 64-bit Windows 7 configured to use my own kernel debugger DLL in order to communicate with the host (the principle is similar to Skywing’s VirtualKD).

The way how Windbg communicates with the virtual machine is the following

Windbg.exe <---- (over named pipe) —> vmware-vmx.exe <– (over vmware speed port) –> remote kernel debugger DLL in VM <------> NT kernel in VM

The problem comes when I am debugging a user mode application with kernel debugging. Typically, I put breakpoint at the entry point of an EXE and run it in the virtual machine. The breakpoint is then caught by the kernel debuger and Windbg stops at it.

From that point, everything is EXTREMELY SLOW. Doing a single step over an instruction takes several seconds and it is really unusable for any serious work. When I investigated the problem, I checked Windbg’s communication with the VM (Ctrl+Alt+D), which revealed no errors. However, there was one like that I noticed:

KdReadPhysical(00000000`0cf48018, 8) returns 00000000, 8
Amd64VtoP: zero PDPE <====== !!!
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=b8, PacketId=80800001,
READ: Received Type 2 data packet with id = 80800001 successfully.

Fuhrter investigation showed that the delay is probably caused by dbghelp.dll, when it tries to resolve symbols. When I changed the kernel debugging in the VM to stop using my kernel debugger DLL and use serial port instead, the problem didn’t go away.

Does anyone in this list have any idea what could go wrong. Or, does anyone here have the same experience with slow kernel debugging of 64-bit targets?

Thanks for any hints that might show me what is wrong.

I don’t know whether it is your problem but…

There was a bug fixed sometime recently and the fix is in the Windows
Developer Preview release

http://www.osronline.com/showThread.CFM?link=215928

This certainly cured my really really slow debugger problem (with the only
downside that the register window no longer works). I occassionaly see slow
down, but that’s usually a symbol resolution thing

Hi, Rod,

Replacing my Windbg with the one from Developer preview
increased the speed of the debugging by a large amount.
Fuhrtermore, after closing all memory windows, the speed
of the debugging is now comparable to 32 <-> 32 debugging
that I’ve been used to since I started using the VMWARE
debugging approach.

Registers window no longer works for me either. I’ll do
some research if I can speed-up the memory window(s).

Thanks a lot.

L.