none
Cannot Break into Win7 or Win8 Target During Kernal Debugging RRS feed

  • Question

  • Hi,

    After successfully debugging my network filter driver using VS2013 on my Win7 x64 host (using FireWire to connect to a Win7 32-bit target computer) for a few weeks, I now cannot  break into the target to set breakpoints, etc., which used to be no problem.  Deployment works fine and produces no errors.  I have both the WDK 7600.16385.1 and the Windows Driver Kit (8.1) installed on the host (although I just uninstalled WDK 7600.16385.1 - no change).

    The difference between then and now is that I created multiple partitions on my target computer's hard disk to allow booting multiple versions of windows (I would not think that this would be an issue). However since then no luck breaking into the OS.

    To test my understanding of setting up the environment, I set up a virtual machine using a serial/pipe connection, and I could break successfully into this target with VS2013, set breakpoints, and debug normally. 

    I installed Win81 (32-bit) in one of the new partitions on the target computer and set up network debugging.  Deployment again works correctly, but I cannot break into the computer.

    I checked the inheritance chain for bcdedit on the target computer using /enum all:

    {current} inherits {bootloadersettings}

    {bootloadersettings} inherits {globalsettings} and {hypervisorsettings}

    {globalsettings} inherits {dbgsettings}, {emssettings}, {badmemory}

    {dbgsettings} settings for NET debugging are:

    Debugger Settings
    -----------------
    identifier             {dbgsettings}
    key                     M77UKSXRIE8D.RXO9A4G33Y2K.9TEKGT29MLH.O0AXRTFC0OUC
    debugtype           NET
    hostip                 3232285953
    port                    50466
    dhcp                   Yes

    So to recap, firewire used to work in Win7 32-bit, but does not now.  Win81 (32-bit) using network debugging also does not allow breaking into the target.

    Any ideas? I been trying to solve this for a few days...

    Regards,

    dcr





    • Edited by jai11 Wednesday, January 29, 2014 7:52 PM
    Wednesday, January 29, 2014 7:16 PM

Answers

  • Hi,

    Solved!

    The "1394 Windows Debug Driver (kernel Mode)" driver was obviously not enabled (yellow bang).  I uninstalled the driver (and chose the checkbox to delete it).  After rescanning, the original 1394 driver was reinstalled.  I then re-ran WinDBG in administrator mode - it installed the driver and immediately connected to the target.  I then closed WinDBG and tried VS2013, which also worked. Now debugging works as expected.  How I created the problem in the first place is a mystery...

    Thanks again for your help.

    dcr

    Thursday, January 30, 2014 1:45 AM

All replies

  • Are you able to do kernel debugging from WinDbg? If not, look at what error message WinDbg gives you (it's sometimes better than what you'll get in VS).

    Did you rerun provisioning from your host machine to make sure the debugger settings are in sync? In order to successfully debug, the debugger settings stored on the host machine must match those set on the target machine (which you can see with "bcdedit -dbgsettings"). I'd suggest trying to re-run the target computer provisioning (make sure to provide whatever debugger settings you want) just to be safe: there is no need to do a unprovisioning before doing that re-run.

    You can always look at %localappdata%\Microsoft\DriverTest\MachineConfig.xml on the host machine to make sure the debugger settings on the host match those on the target.



    Max -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, January 29, 2014 11:21 PM
  • Hi,

    Thanks for the quick response, and the tip that "unprovisioning" is unnecessary.

    Will try your suggestions and report back.

    dcr

    Thursday, January 30, 2014 12:01 AM
  • Hi,

    This is frustrating!

    I am now getting an error dialog: "Windows Debugging Extension for Visual Studio. Could not start debug session, error 80070002.  The system could not find the specified file." when I start debugging.

    dcr

    Thursday, January 30, 2014 1:02 AM
  • Hi,

    The 80070002 seems related to the Firewire driver, which has a yellow bang in Device Manager, and is called "1394 Windows Debug Driver (kernel Mode)."

    When I run WinDBG, select "Kernel Debug" then 1394 and enter my channel number "1", error messages: "Failed to open 1394 channel 1... driver may not be installed..."

    I specifically changed the channel to 1 on the host machine to match that on the target: bcdedit /dbgsettings 1394 channel:1.

    Is this what you meant when you said match the debug settings between host/target?

    Thanks,

    dcr

    Thursday, January 30, 2014 1:20 AM
  • What I said about debug settings having to match between host and target is only applicable for debugging from VS. When debugging from WinDBG, it doesn't apply. That being said, if you get an error in WinDbg, it means the problem is not with the WDK VS integration, but rather with the debugging itself.

    Is the 1394 host controller disabled? Or something similar? I would suggest looking at this MSDN documentation for help.


    Max -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, January 30, 2014 1:29 AM
  • Hi,

    Solved!

    The "1394 Windows Debug Driver (kernel Mode)" driver was obviously not enabled (yellow bang).  I uninstalled the driver (and chose the checkbox to delete it).  After rescanning, the original 1394 driver was reinstalled.  I then re-ran WinDBG in administrator mode - it installed the driver and immediately connected to the target.  I then closed WinDBG and tried VS2013, which also worked. Now debugging works as expected.  How I created the problem in the first place is a mystery...

    Thanks again for your help.

    dcr

    Thursday, January 30, 2014 1:45 AM