WinDbg:尝试附加到进程时dbghelp.dll的版本不匹配 [英] WinDbg: Version mismatch of dbghelp.dll when trying to attach to a process

查看:611
本文介绍了WinDbg:尝试附加到进程时dbghelp.dll的版本不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一年以前,我已经使用WinDbg和DebugDiag在Java中使用的JNI本机DLL中找到内存泄漏。现在我正在寻找一个线程句柄泄漏。
我使用Process Explorer创建了一个内存转储,并尝试在DebugDiag中进行分析,但是我得到的都是脚本错误:



我也尝试过WinDbg,但是它不能再附加到进程。我总是收到错误消息dbghelp.dll的版本与调试器不匹配:
(Unbekannter Fehler表示未知错误)



我卸载了DebugDiag和Windows SDK,然后下载最新版本并安装了Windows SDK 8和DebugDiag 1.2(x86)。问题保持不变即使使用版本7.1替换Windows SDK(最新的Windows 7 SDK)也没有任何变化。



我正在使用带有Windows 7(32位)的机器。 / p>

我假设DebugDiag中的问题与WinDbg中的问题有相同的原因。但是我不明白什么版本不匹配(谷歌搜索也没有帮助):




  • WinDbg:6.12.0002.633

  • dbgeng:6.12.0002.633

  • dbghelp:6.12.0002.633



如何使WinDbg(并希望DebugDiag)再次工作?

解决方案

这是dbgeng部分的伪代码执行此检查:

  var(
g_ApiVersion = API_VERSION {1,0,12,0}
g_DbghelpVersion API_VERSION
g_EngOptions =选项{...}


func ChkDbghlpVersion()uint32 {
g_DbghlpVersion = dbghelp.ImagehlpVersionEx(g_ApiVersion)
如果g_DbghelpVersion.Revision g_ApiVersion.Revision {
DebugOutput(dbghelp.dll与调试器的版本不匹配)
if!(g_EngOptions.SomeOpt& 1){
return E_UNKNOWN
}
}
return S_OK
}

所以,你应该检查什么 dbghelp.dll 从调试文件夹返回从 ImagehlpApiVersionEx (可能是什么 dbgeng.dll 在其 g_ApiVersion 中)找出调试器失败的原因。



可能的原因:




  • dbghelp.dll真的有一个备用的构建信息。

  • dbgeng.dll已损坏(? ),并在其api版本块


中包含无效数据

Over a year ago I already used WinDbg and DebugDiag to find a memory leak in a JNI native DLL that we use from within Java. Now I am searching for a thread handle leak. I created a memory dump using Process Explorer and tried to analyze it in DebugDiag, but all I get are script errors:

I also tried WinDbg, but it is not able to attach to a process anymore. I always get the error message "dbghelp.dll has a version mismatch with the debugger": ("Unbekannter Fehler" means "Unknown error")

I uninstalled DebugDiag and the Windows SDK, then downloaded the newest versions and installed Windows SDK 8 and DebugDiag 1.2 (x86). The problem stays the same. Even after replacing the Windows SDK with Version 7.1 (the latest SDK for Windows 7) nothing changes.

I'm using a machine with Windows 7 (32 Bit).

I assume that the problems in DebugDiag have the same cause as the problems in WinDbg. But I don't understand what version mismatch is meant (and googling didn't help either):

  • WinDbg: 6.12.0002.633
  • dbgeng: 6.12.0002.633
  • dbghelp: 6.12.0002.633

How can I make WinDbg (and hopefully DebugDiag) work again?

解决方案

This is pseudo code of the part of dbgeng that performs this check:

var (
    g_ApiVersion = API_VERSION{1, 0, 12, 0}
    g_DbghelpVersion API_VERSION
    g_EngOptions = Options{...}
)

func ChkDbghlpVersion() uint32 {
    g_DbghlpVersion = dbghelp.ImagehlpVersionEx(g_ApiVersion)
    if g_DbghelpVersion.Revision < g_ApiVersion.Revision {
        DebugOutput("dbghelp.dll has version mismatch with the debugger")
        if !(g_EngOptions.SomeOpt & 1) {
            return E_UNKNOWN
        }
    }
    return S_OK
}

So, you should check what dbghelp.dll from the debugging folder returns from ImagehlpApiVersionEx (and possibly what dbgeng.dll has in its g_ApiVersion) to find out why your debugger is failing.

Possible causes:

  • dbghelp.dll really has an alternate build information.
  • dbgeng.dll is corrupt (?) and contains invalid data in its api version block

这篇关于WinDbg:尝试附加到进程时dbghelp.dll的版本不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆