locked
Dbghelp.dll and DBG files for 64-bit modules RRS feed

  • Question

  • Hi,

    A bit of background info first:
    Our company uses Delphi XE2 compiler to build the products for both Win32 and Win64. Delphi can create MAP files with the symbol info for the compiled executables, and we use map2dbg program to make DBG files from these MAPs.

    When we get a dump file from Windows Error Reporting for our 32-bit software, we can load these DBGs into WinDbg to simplify the bug analysis.
    But when we try to open a dump for the 64-bit applications, WinDbg refuses to load the corresponding DBG files.

    I've studied dbghelp.dll, and found out that there is an artificial limitation on the DBG files it recognizes - the library only accepts the DBGs with Machine header field set to 0x14c (Intel x86) and 0x184 (Alpha). And if the Machine field is set to 0x8664 (AMD64), the dbghelp reports "timestamp mismatch" and skips the file.

    This indeed is an artificial limitation, and when I've removed the Machine field check from cbFindDbg and ReadHeader functions, the modified dbghelp.dll was able to correctly work with the DBG files made for 64-bit executables.

    So I have the following feature request:
    Could the WinDbg team please remove this limitation from dbghelp library, and allow for loading not only the DBGs for x86 or Alpha modules, but for AMD64 modules too?

    We can happily live with the modified version of dbghelp.dll, but I know for sure there are many other Delphi/Builder developers who would really be glad to load their DBGs into WinDbg or Process Explorer.

    Thanks in advance!

    Tuesday, December 11, 2012 7:07 AM

All replies

  • For suggestions concerning windbg-debugger, probably you need to mail to debugging-team at windbgfb like described here:
    http://msdn.microsoft.com/en-us/windows/hardware/gg463028.aspx

    No warranty
    With kind regards

    Tuesday, December 11, 2012 9:14 AM
  • You can try to use TDS2PDB tool to convert TD32 debug information into PDB file. There is another TDS2PDB tool available here

    Generation of TD32 debug information is disabled by default in Delphi compiler. You can enable it on Linker page in project option. It's called "Debug information" in new Delphi versions and "Include TD32 debug info" in older versions. There is also an option to place TD32 information into separate file (.tds). 

    Tuesday, September 3, 2013 2:21 AM