Can I disable the "Unable to read dynamic function table entry" message in WinDbg?

时间:2016-08-31 17:45:00

标签: windbg stack-trace stack-unwinding

I'm working with a program that generates a lot of code at runtime, and seems not to produce any unwind data for it. (I don't have source code for this program; I'm writing a plugin for it.)

When the program hangs, I break into it with WinDbg, and try to get a stack trace for all threads with ~* k. As well as the stack traces, I also get pages and pages (and pages, and more) of messages along the line of

Unable to read dynamic function table entry at 00000000`2450b580

This takes a long time to print - over a minute - and it overflows the scroll buffer, so I lose most of the output.

I've worked around this for now by hex-editing the DLL that contains this message, but... seriously. Is there an official way of getting rid of this message?

I'm prepared for a crappy stack trace from the problem thread(s).

2 个答案:

答案 0 :(得分:2)

如果您正在运行最新版本的windbg

您可以尝试设置引擎初始化设置

0:000> dx Debugger.Settings.EngineInitialization.VerifyFunctionTableCallbacks
Debugger.Settings.EngineInitialization.VerifyFunctionTableCallbacks                 : true
0:000> dx Debugger.Settings.EngineInitialization.VerifyFunctionTableCallbacks = false
Debugger.Settings.EngineInitialization.VerifyFunctionTableCallbacks = false : false
0:000> dx Debugger.Settings.EngineInitialization.VerifyFunctionTableCallbacks
Debugger.Settings.EngineInitialization.VerifyFunctionTableCallbacks                 : false

答案 1 :(得分:2)

请注意,这是一项安全功能,因此请自行承担风险。有两种选择:

  • 如果您知道导致此问题的模块,您可以添加注册表的完整路径:HKLM \ Software \ Microsoft \ Windows NT \ CurrentVersion \ KnownFunctionTableDlls注册表项
  • 您可以使用.settings set EngineInitialization.VerifyFunctionTableCallbacks=false
  • 停用它

第二个选项仅为当前会话禁用它。如果您想将其永久化,可以使用.settings save跟进。