Windbg .load 扩展需要路径中的转义反斜杠 (\) 字符

Windbg .load extension wants an escaped backslash (\) character in the path

当我尝试在 Windbg 中使用 .load 命令加载 sos 或 psscor4 等扩展时,它表现出我没有预料到的行为。所以,也许这只是让我对这种行为正常的期望正确的问题。

例如,当我说:

0:00> .load "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll"

报错如下:

The call to LoadLibrary(C:WindowsMicrosoft.NETFramework64v4.0.30319sos.dll) failed, Win32 error 0n2 "The system cannot find the file specified." Please check your debugger configuration and/or network access.

我推断它希望我转义反斜杠。

但是,当我像这样转义反斜杠字符时,它工作正常并加载扩展。

0:00> .load "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll"

嗨使用看起来像这样

@"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll"

希望对您有所帮助

没有引号也能正常加载

0:00> .load C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll

即使路径包含空格。