12

我希望我的应用程序创建一个小型转储来帮助调试未经处理的异常。

在创建转储之前,我可能不知道我想要什么类型的迷你转储,那么我应该使用哪些MINIDUMP_TYPE标志组合来为我提供最完整的转储呢?

4

2 回答 2

13

在 DebugInfo.com 链接(感谢 David)和 MSDN 页面的帮助下,我提出了以下列表。并非所有标志都包含在 DebugInfo.com 链接中。

使用这些标志应该创建一个全面但很大的小型转储。

包括:

MiniDumpWithFullMemory                  -       the contents of every readable page in the process address space is included in the dump.      
MiniDumpWithHandleData                  -       includes info about all handles in the process handle table. 
MiniDumpWithThreadInfo                  -       includes thread times, start address and affinity. 
MiniDumpWithProcessThreadData           -       includes contents of process and thread environment blocks. 
MiniDumpWithFullMemoryInfo              -       includes info on virtual memory layout. 
MiniDumpWithUnloadedModules             -       includes info from recently unloaded modules if supported by OS. 
MiniDumpWithFullAuxiliaryState           -       requests that aux data providers include their state in the dump. 
MiniDumpIgnoreInaccessibleMemory        -       ignore memory read failures. 
MiniDumpWithTokenInformation            -       includes security token related data.

排除:

MiniDumpNormal                          -       value is 0 so always implicitly present, unless excluded by a callback (which I won't be doing).
MiniDumpWithPrivateReadWriteMemory      -       excludes contents of shared memory. 
MiniDumpWithIndirectlyReferencedMemory  -       includes memory pages referenced by pointers on the stack, but assuming MiniDumpWithFullMemory already includes all pages in the process address space anyway.
MiniDumpWithDataSegs                    -       contents of writable data sections are already included by specifying MiniDumpWithFullMemory
MiniDumpWithCodeSegs                    -       assuming MiniDumpWithFullMemory includes this. 
MiniDumpWihtoutOptionalData             -       suppresses all memory operations other that MiniDumpNormal. 
MiniDumpFilterMemory                    -       filters out contents of stack memory (also has no effect if MiniDumpWithFullMemory used).
MiniDumpFilterModulePaths               -       removes module paths from the dump. 
MiniDumpScanMemory                      -       used to exclude memory for specific modules via callbacks. 
MiniDumpWithPrivateWriteCopyMemory      -       assume MiniDumpWithFullMemory already includes this.
于 2011-02-18T13:36:37.980 回答
4

阅读DebugInfo.com 上的 Effective minidumps看起来会引导您找到解决方案。

于 2011-02-18T12:23:27.610 回答