windows - MINIDUMP_TYPE 枚举值的哪种组合会给我最多 'complete' 小型转储?

标签 windows winapi debugging minidump

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

在创建转储之前,我可能不知道我需要什么类型的小型转储,那么 MINIDUMP_TYPE 的组合是什么?我应该使用标志来提供最完整的转储吗?

最佳答案

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

关于windows - MINIDUMP_TYPE 枚举值的哪种组合会给我最多 'complete' 小型转储?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5041097/

相关文章:

windows - 无法删除 aux 文件

winapi - 什么是 alphablend,它使用了哪些功能?

winapi - 如何开始使用 Microsoft C++

android - 无法在 Windows 7 上安装 Android USB 驱动程序

php - 安装多个 Apache 后 Xampp 中的 Apache 出现问题

c# - Windows defrag 不是内部或外部命令,也不是可运行的程序或批处理文件

windows - Git bash 没有在我的 Windows 上显示另一个用户帐户

c# - 将字符串从 c# 传递到 c dll 时的错误行为

安卓工作室 3.3.1 :Some breakpoints are shown without the tick and not being hit

google-chrome - 如何调试 TLS 实现