这是我的注册表:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
"DumpType"=dword:00000000
"CustomDumpFlags"=dword:00000006
根据本文
DumpType=0
表示自定义转储,然后考虑CustomDumpFlags
。根据这篇文章 CustomDumpFlags=6
的意思是MiniDumpWithFullMemory | MiniDumpWithHandleData
,其中:
现在我有一个崩溃应用程序,所以我运行它,它崩溃了,转储是在 %userprofile%\AppData\Local\CrashDumps 中创建的,我在 Windbg 中打开它并看到以下行:
全内存用户迷你转储文件:仅应用程序数据 可用
相当于
CustomDataFlags=2
那么,我应该如何创建一个包含句柄数据的转储?如果可能的话,我想不使用第三方。
我的操作系统是 Windows 8 或 Windows 2008R2 服务器或更高版本。
尝试
.dumpdebug
,这是一个未记录的命令。在输出的顶部应该有标志:
0:006> .dumpdebug
----- User Mini Dump Analysis
MINIDUMP_HEADER: Version A793 (62F0) NumberOfStreams 15 Flags 41826
0002 MiniDumpWithFullMemory
0004 MiniDumpWithHandleData
0020 MiniDumpWithUnloadedModules
0800 MiniDumpWithFullMemoryInfo
1000 MiniDumpWithThreadInfo
40000 MiniDumpWithTokenInformation
如果您不喜欢冗长的输出,可以使用 shell 上的 findstr 命令对其进行过滤:
.shell -ci ".dumpdebug" findstr "MiniDump"