在线笔记
全部博文(596)
分类: Windows平台
2014-04-20 21:31:47
virtual box :4.1.6
VirtualKD improves kernel debugging performance with VirtualBox and VMWare virtual machines. To use VirtualKD with your VM, you will need to install 3 components:
Install debug transport DLL inside your VM
Prepare VirtualBox to work with VirtualKD (this step is not required if you are using VMWare only)
Start the VM monitor to be able to debug.
This tutorial provides step-by-step instructions on doing it:
Download the and unpack the self-extracting atchive.
If you are using VirtualBox, close all VirtualBox instances and run VirtualKDSetup.exe. Then press "Integrate into VirtualBox".
In the new window press "Automatic integration":If you are using only VMWare, just skip step 2.
Start your virtual machine. Copy target/vminstall.exe to it (e.g. via a shared folder)
Run vminstall.exe on your VM:
Restart the Virtual Machine. If your VM is running Windows 8, in the OS selection menu.
Start vmmon64.exe on the host machine (use vmmon.exe if you are running 32-bit Windows).
Start booting your VM. If VirtualKD has installed correctly, Windows will halt in the beginning of the boot process waiting for a debugger to connect:
Switch back to the vmmon window you should see your VM in the list and the "OS" column should indicate "yes":
Ensure that "OS" column actually mentions "yes". If not, the VirtualKD debug transport has not been loaded (not properly installed?) and the debugging wont't work.
Press the "Run debugger" button. WinDbg will start (if not, press "Debugger path" and specify location of WinDbg):
Now you can start debugging your VM with VirtualKD. Note that currently Windows is just preparing to start and none of your drivers are loaded.
To debug an actual driver, press F5 in WinDbg and let the OS boot.
When OS finishes booting, create a snapshot before you install your driver.
Then install the driver, set the breakpoints and launch it.
If your driver crashes the system, simply close WinDbg, restore the snapshot, go to VMMon window and press "Run debugger" again.