调试器无法通过网络连接攻入vs 2015专业版的KMDF驱动程序

时间:2016-06-07 09:04:13

标签: visual-studio-2015 driver windows-10 kmdf

我正在尝试使用update2在visual studio 2015专业版中设置远程驱动程序调试。我的主机运行在Windows 8.1家庭版64位,目标是一台独立的计算机,运行在Windows 10家庭版64位。我可以通过网络成功配置/配置目标计算机,接下来我按F5调试/部署KMDF驱动程序,部署驱动程序大约需要2分钟,然后部署显示停止,我认为部署过程已经完成,然后我看到目标站点中的设备管理器,驱动程序已成功安装,但是当我按下“全部断开”按钮打破调试器时,没有发生任何事情,它无法打破调试器,kd控制台窗口(即kd> ;)仍然被禁用(灰色),它不能输入任何命令。所以这意味着驱动程序的部署尚未完成,但奇怪的是没有显示有关deploy的任何错误消息,并且驱动程序也已成功安装在目标站点中。

以下是部署阶段“调试器立即窗口”输出的信息。这个问题让我花了好几个星期来解决它,但我仍然不能。我希望有人可以帮助我或给我一些建议,谢谢!

Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

SIMON\simon96 (npipe WinIDE_01D1BFBFC94007E3) connected at Mon Jun 06 14:51:00 2016

Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

Using NET for debugging
Opened WinSock 2.0
Waiting to reconnect...
[14:51:01:965]: Remove Existing Remote Package
[14:51:02:028]: Task "Remove Existing Remote Package" completed successfully
[14:51:02:028]: Copy Driver Package
[14:51:02:434]: Task "Copy Driver Package" completed successfully
[14:51:02:449]: Driver Removal
[14:51:02:449]: Removing any existing files from test execution folder.
[14:51:02:543]: Copying required files for "Driver Removal".

$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverRemoval'" /p:"InfFile=Test7KMDF_vs2015_u2.inf" /p:"Debug=1" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"CertificateFile=Test7KMDF_vs2015_u2.cer" /p:"PackageGuid=x64" /p:"HardwareId=Root\Test7KMDF_vs2015_u2" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Removal_00016.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[14:51:36:544]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[14:51:36:544]: Task "Driver Removal" completed successfully
[14:51:37:215]: Driver Preparation
[14:51:37:215]: Removing any existing files from test execution folder.
[14:51:37:262]: Copying required files for "Driver Preparation".

$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPreparation'" /p:"InfFile=Test7KMDF_vs2015_u2.inf" /p:"Debug=1" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"CertificateFile=Test7KMDF_vs2015_u2.cer" /p:"PackageGuid=x64" /p:"HardwareId=Root\Test7KMDF_vs2015_u2" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Preparation_00016.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[14:51:48:934]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[14:51:48:934]: Task "Driver Preparation" completed successfully
[14:51:49:622]: Driver Install
[14:51:49:622]: Removing any existing files from test execution folder.
[14:51:49:763]: Copying required files for "Driver Install".

$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_RunProcess'" /p:"BinaryPath=%SystemDrive%\DriverTest\devcon.exe" /p:"Arguments=-f install %SystemDrive%\DriverTest\Drivers\Test7KMDF_vs2015_u2.inf Root\Test7KMDF_vs2015_u2" /p:"WorkingFolder=%SystemDrive%\DriverTest\Drivers" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Install_00008.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[14:51:58:653]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[14:51:58:653]: Task "Driver Install" completed successfully
[14:51:59:028]: Driver Post Install Actions
[14:51:59:028]: Removing any existing files from test execution folder.
[14:51:59:075]: Copying required files for "Driver Post Install Actions".

$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPostInstall'" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Post_Install_Actions_00017.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[14:52:07:560]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[14:52:07:575]: Task "Driver Post Install Actions" completed successfully

1 个答案:

答案 0 :(得分:2)

花了一天之后,我发现了一些对我有用的东西。

注意:我为主机和目标计算机使用了静态IP连接。

第1步

在主机上配置目标设备(使用Visual Studio)在目标上进行部署之前。在目标计算机启动

  

具有高级安全性的Windows防火墙

检查

  

Windows防火墙属性

私有公开 个人资料 设置

  

入站连接

允许。我还通过将所有域,公共和私有配置文件的防火墙状态设置为“关闭”来禁用防火墙。

Firewall Properties

第2步

a)使用Visual Studio Solution Explorer在主机上配置目标设备。确保设置目标计算机以太网适配器的正确总线参数。在目标计算机上查看网络适配器的设备管理器,以检查您需要设置的总线参数。

b)启动调试器时,它会在目标计算机上部署驱动程序之前的最后一步停止。您将看到以下消息......

等待完成.. 等待结束..

c)检查目标机器上的静态IP设置;在驱动程序部署的最后阶段,这些被空白条目覆盖。更正条目并确保您可以从目标ping主机,反之亦然。

d)完成上述操作后,驱动程序部署完成,您再也看不到“等待完成”消息(您可能会收到与设置还原点相关的错误。忽略它)

第3步

如果一切顺利,您应该在调试器立即窗口

中看到以下消息
Using NET for debugging
Opened WinSock 2.0
Waiting to reconnect...
[10:59:06:155]: Remove Existing Remote Package
[10:59:06:582]: Task "Remove Existing Remote Package" completed successfully
[10:59:06:601]: Copy Driver Package
Connected to target 169.254.31.204 on port 50839 on local IP 192.168.1.2.