none
Windows Kernel Debbuging: Debug over virtual serial port with WDK 8.1 RRS feed

  • Question

  • I'm currently having some issues doing kernel debugging of a Windows 7 x64 target from my Windows 8.1 x64 host machine. I'm running Visual Studio 2013 with WDK 8.1 on my host and have provisioned my target machine running in VMWare.

    Here are my configurations for the target machine. It was configured by reading mostly from here - http://www.codeproject.com/Tips/545835/Kernel-Mode-Debugging-in-a-VM-using-Visual-Studio :

        Windows 7 x64
        Serial port COM2 with VMWare with name \\.\pipe\com2. All proper options in VMWare are checked
        Debug flag for OS enabled through msconfig. Debug port is COM2 running at 115200 baud.
        I ran the test target client "WDK Test Target Setup x64-x64_en-us.exe" on the machine before provisioning the computer

    I was able to provision the computer properly -- it created the WDK Remove User account. However, I'm running into some issues actually debugging. Below are the steps

        Launch the Windows 7 x64 target image in VMWare and wait on the boot menu
        In Visual Studio (host machine), go to Debug -> Attach to process -> Select my computer -> Select process "Kernel" -> Attach
        In VMWare, press enter to boot Windows
        It takes a while, but on my host machine, Visual Studio eventually connects. I can choose to "Break All" and actually use the debugger.

    However, I can't seem to connect to the debugger if I don't do it before booting the kernel. And I can only attach once. For example, I can't let Windows initialize to the desktop and then build my driver and begin debugging. The debugger will always hang on "Waiting to reconnect...". The same goes for if I begin debugging on kernel initialization, decide to stop debugging, then try to reconnect or reattach; it will hang on "Waiting to reconnect..." indefinitely as well.
    Friday, May 1, 2015 3:41 AM

Answers

  • Follow the directions here: https://msdn.microsoft.com/en-us/library/windows/hardware/jj200334%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

    You are using user mode debug setup menus, that won't work.


    Mark Roddy Windows Driver and OS consultant www.hollistech.com

    Friday, May 1, 2015 2:23 PM
    Moderator

All replies

  • Follow the directions here: https://msdn.microsoft.com/en-us/library/windows/hardware/jj200334%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

    You are using user mode debug setup menus, that won't work.


    Mark Roddy Windows Driver and OS consultant www.hollistech.com

    Friday, May 1, 2015 2:23 PM
    Moderator
  • hi

       since you have used the virtual serial port to debug.. My case is almost same.In my case am trying to kernel debug the boot_start up driver over manual serial cable.But in my case the .kd files are not replacing.if you can able to solve my issue,it will be great pleasure,

    Tuesday, June 2, 2015 1:36 PM