WinDbg: Version mismatch of dbghelp.dll when trying to attach to a process

心不动则不痛 提交于 2019-12-01 23:53:32

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!