我在那里使用 windows7 主机我安装了 Vusual Studio 2013 和 WDK 8.1 我还有使用 Virtual Box 的 Windows 10 虚拟机。
我从模板创建新的 KMDF 驱动程序并尝试调试它。
我成功配置了目标机器(与 win10 是虚拟的),驱动程序成功部署,但调试器仍然处于非活动状态。这是来自调试器即时窗口的日志:
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Starting New Debugger Session
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Microsoft (R) Windows Debugger Version 6.3.9600.17336 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
SM72UC\User (npipe WinIDE_01D16A27752C70A4) connected at Thu Feb 18 11:36:27 2016
Microsoft (R) Windows Debugger Version 6.3.9600.17336 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
Opened \\.\pipe\com1
Waiting to reconnect...
[11:36:28:242]: Removing any existing files from the remote driver folder
[11:36:28:771]: Removing any existing files from test execution folder
te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverRemoval'" /p:"InfFile=KMDFTest.inf" /p:"Debug=1" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"HardwareId=Root\KMDFTest" /p:"CertificateFile=KMDFTestPackage.cer" /p:"PackageGuid={A23BA0FC-7265-4E3C-B99F-1E7A04AD970D}" /rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Driver_Removal_(x64)_(possible_reboot)_00009.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[11:36:52:104]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[11:36:52:705]: Removing any existing files from test execution folder
te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPreparation'" /p:"InfFile=KMDFTest.inf" /p:"Debug=1" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"HardwareId=Root\KMDFTest" /p:"CertificateFile=KMDFTestPackage.cer" /p:"PackageGuid={A23BA0FC-7265-4E3C-B99F-1E7A04AD970D}" /rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Driver_Preparation_(x64)_(possible_reboot)_00009.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[11:36:58:137]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[11:36:58:792]: Removing any existing files from test execution folder
te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_RunProcess'" /p:"BinaryPath=%SystemDrive%\DriverTest\devcon.exe" /p:"Arguments=-f install %SystemDrive%\DriverTest\Drivers\KMDFTest.inf Root\KMDFTest" /p:"ExitCodes=0" /p:"WorkingFolder=%SystemDrive%\DriverTest\Drivers" /p:"LogOutput=1" /rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Driver_Install_(x64)_(possible_reboot)_00003.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[11:37:22:743]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[11:37:23:235]: Removing any existing files from test execution folder
te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPostInstall'" /rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Driver_Post_Install_Actions_(x64)_(possible_reboot)_00009.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[11:37:25:227]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[11:37:25:775]: Driver Installation summary:
[11:37:25:781]: Driver Removal (x64) (possible reboot): Pass
[11:37:25:784]: Driver Preparation (x64) (possible reboot): Pass
[11:37:25:785]: Driver Install (x64) (possible reboot): Pass
[11:37:25:787]: Driver Post Install Actions (x64) (possible reboot): Pass
在此调试器卡住后,控制台处于非活动状态并显示文本“Debuggee 正在运行...”我没有在 DriverEntry 函数处到达断点,看不到来自内核和驱动程序的任何调试消息。
我还尝试了调试网络设置,但结果相同。
怎么了?
是否存在 VirtualBox 问题?还是因为我尝试在win10上调试win7驱动?