测试机
通过“运行”打开msconfig,通过引导选项->高级选项选择调试,使用USB端口,并设置USB目标名
然后通过HE工具查看port口的属性,选择可连接,支持debug,支持3.0的port
通过命令提示符(管理员权限)进行port配置
bcdedit /debug on bcdedit /dbgsettings usb targetname:<USB目标名> bcdedit /set "{dbgsettings}" busparams x.x.xbcdedit /set “{dbgsettings}” busparams x.x.x
x.x.x分别是port对应的Host Controller的bus.device.function,如0.20.0
配置完成后重启测试机
主机
通过微软商店的Windbg和传统的Windbg
传统的Windbg
需要下载Debugging Tools for Windows
下载完成后可以看到C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\usb这个路径,连接USB 3.0后需要在设备管理器手动识别usb文件夹加载驱动
主机
该Windbg可以通过attach to kernel开始调试
参考文献
https://zhuanlan.zhihu.com/p/405683773
https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/setting-up-a-usb-3-0-debug-cable-connection