none
A Deployed KDMF USB Driver is not debuggable RRS feed

  • Question

  • A Simple KDMF USB Driver is deployed on a target machine 

    1. Target Machine has a USB Sniffer installed
    2. Target is Win 8.1 (x64)
    3. Host is Win 2012 Ent (x64)
    4. WinDbg Remote Debugging Toolset is used
    5. Target is provisioned
    6. Breakpoints are set using the Visual Studio IDE
    7. Deployment succeed, no errors at setupapi.dev.log
    8. The USB Sniffer shows the URB interaction triggered by the deployed KMDF USB Driver Indicating the driver is actually running
    9. Although the driver is running and the debugger seemed to be attached execution doesn't break at any of the breakpoints set.
    10. The debugger doesn't automatically break once attached.
    11. Manually Breaking execution and running "x *!" verify that the KDMF USB Driver is loaded
    12. Manually Breaking execution and running "x %Driver Name%!*" verify that the KDMF USB Driver symbols are properly loaded
    13. KdPrint Shows on the Debugger Immediate window
    14. Manually Breaking execution and running "bl" list no breakpoints
    15. "Bcdedit.exe -set TESTSIGNING ON" was executed on the Target machine
    16. A test certificate is used to sign the test driver
    17. Deployment is completed with the following:
      [10:32:27:777]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
      [10:32:28:262]: Driver Installation summary:
      [10:32:28:264]:   Driver Removal (x64) (possible reboot): Pass
      [10:32:28:267]:   Driver Preparation (x64) (possible reboot): Pass
      [10:32:28:277]:   Default Driver Package Installation Task (possible reboot): Pass
      [10:32:28:280]:   Driver Post Install Actions (x64) (possible reboot): Pass

    Having the above in mind, why does the debugger doesn't break execution at the pre-defined break-points? why does the WinDbg "bl" command list no break points although few are set using the Visual Studio IDE?

    Re-provisioning/rebooting/... doesn't resolve the problem

    UPDATE:

    Adding DbgBreakPoint at code level finally made the debugger break, This is enough for me to keep on going, Still, why the breakpoints set by the Visual Studio IDE are ignored... ?


    Nadav Rubinstein, See my Blog @ http://www.sophin.com






    • Edited by Nadav Rub Wednesday, August 27, 2014 9:13 AM
    Wednesday, August 27, 2014 6:29 AM

All replies

  • are you using VS to kernel debug or windbg? both cannot be the kernel debugger concurrently

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

    Wednesday, August 27, 2014 7:03 PM
  • I am using VS to debug, ~WinDbg/KD~ commands are executed through the VS Immediate Debugging console.

    Nadav Rubinstein, See my Blog @ http://www.sophin.com



    • Edited by Nadav Rub Thursday, August 28, 2014 4:54 AM
    Thursday, August 28, 2014 4:52 AM
  • Me too!

    I use Surface Pro 3(Win8.1) + VS 2013 +WDK, create KMDF HelloWorld driver and deploy to target(VM Win8.1) pc, show your result on the Debugger Immediate window. But can't break all then debuging.

    Friday, August 29, 2014 2:14 AM