2

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).

Tom Seddon
  • 2,648
  • 1
  • 19
  • 28

2 Answers2

2

if you are running the latest versions of windbg

you can try setting the Engine Initialization Settings

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
blabb
  • 8,674
  • 1
  • 18
  • 27
  • dx seems to be a new command. It's documented [online](https://msdn.microsoft.com/en-us/library/windows/hardware/dn936815(v=vs.85).aspx) but I can't find it in WinDbg 6.2 help. Do you know when it was introduced? – Thomas Weller Sep 01 '16 at 08:15
  • See here: https://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-138-Debugging-dx-Command-Part-1 and https://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-139-Debugging-dx-Command-Part-2 . – Dono Sep 01 '16 at 08:30
  • 1
    @thomas dx was pushed in windows 10 sdk / ddk / debugger builds. (10.******5.8.6) around a year back – blabb Sep 01 '16 at 10:37
2

Note that this is a security feature, so disable it at your own risk. There are two options:

  • If you know which module is causing this, you can add the full path to the register: HKLM\Software\Microsoft\Windows NT\CurrentVersion\KnownFunctionTableDlls registry key
  • You can disable it with .settings set EngineInitialization.VerifyFunctionTableCallbacks=false

The second option only disables it for the current session. If you want to make it permanent, you can follow it with .settings save.

Dono
  • 1,254
  • 13
  • 30
  • .settings seems to be a new command. It's documenteed [online](https://msdn.microsoft.com/en-us/library/windows/hardware/dn925473(v=vs.85).aspx) but I can't find it in WinDbg 6.2 help. Do you know when it was introduced? – Thomas Weller Sep 01 '16 at 08:10
  • Sorry, but I do not know. – Dono Sep 01 '16 at 08:31
  • SO is bugging me to an accept an answer, so who am I to argue? I have been off Windows since and haven't had time to try it but this answer certainly sounds plausible ;) – Tom Seddon Sep 21 '16 at 14:16