【问题标题】:MDbg - Debugger's Protocol Is Incompatible With The DebuggeeMDbg - Debugger 的协议与 Debuggee 不兼容
【发布时间】:2013-02-14 14:38:24
【问题描述】:

我正在使用 MDbg 检索在进程的应用程序域中列出的所有程序集的列表。每当我尝试将进程附加到 MDbgEngine 时,我都会收到以下异常消息:

调试器的协议与被调试者不兼容。 (HRESULT 异常:0x8013134B)

我是否遗漏了某些内容或错误地调用了该方法?我正在使用 .NET Framework 4.0,MDbg 核心参考取自 \Microsoft SDKs\Windows\v7.0A\Bin\MdbgCore.dll。

代码:

MDbgProcess process;
MDbgEngine mDbgEngine = new MDbgEngine();
process = mDbgEngine.Attach(myProcess.Id); // this line causes the error
foreach (CorAppDomain appDomain in process.AppDomains)
{
   foreach (CorAssembly assembly in appDomain.Assemblies)
   {
      //get assembly information
   }
}

【问题讨论】:

  • 可能你使用的是 .NET 2 版本的 MDbg 或者位数错误。
  • MDbg 需要一段时间才能支持 .NET 4 调试器协议版本,它不会在 SDK 版本 7 中实现。我已经为您提供了版本 4 示例的链接。
  • @Matthew 较早的帖子,但与我的需求类似。由于您的帖子和 Hans Passant 的提示,我同时解决了这个问题。如果您仍然需要它,这是我的帖子:stackoverflow.com/questions/40803406/…

标签: c# .net debugging


【解决方案1】:

mdbg 位置在:

C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin/

适用于 3.x 版本的框架,位于:

C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools/

适用于 4.x 版本的框架。谢谢你。美好的一天。

【讨论】:

    猜你喜欢
    • 2016-07-13
    • 2022-12-12
    • 2011-01-23
    • 2018-12-31
    • 2019-08-17
    • 2011-02-26
    • 1970-01-01
    • 1970-01-01
    • 2014-01-07
    相关资源
    最近更新 更多