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

标签 c# .net debugging windbg sos

当我尝试在 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"

最佳答案

没有引号也能正常加载

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

即使路径包含空格。

关于c# - Windbg .load 扩展需要路径中的转义反斜杠 (\) 字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43282882/

相关文章:

javascript - 在 Node.js 中使用 mongoose 样式模式 MSSQL

c# - 用于构建应用程序的 "Main Form"想法的其他替代方案

c# - 获得用户文化,而不是线程文化

mysql - 在 Laravel 中将 SQL 查询转储到屏幕

c# - 覆盖 Equals() 但不检查所有字段 - 会发生什么?

c# - 作为源的 SSIS 脚本组件抛出 System.NullReferenceException

c# - 将 '\n' 而不是 '\\n' 拆分为字符串数组

c++ - 使用 gdb 在 Eclipse 中调试简单 C++ 时出现 "No source available for main()"错误

debugging - 如何调试Azure Web App内存泄漏?

c# - 如何将 C++ 套接字编程代码转换为 C#?