2 * Copyright 2022 Nikolay Sivov for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_MINIDUMP_H
20 #define __WINE_MINIDUMP_H
28 #define MINIDUMP_SIGNATURE 0x504D444D /* 'MDMP' */
29 #define MINIDUMP_VERSION (42899)
32 typedef ULONG64 RVA64
;
33 #define RVA_TO_ADDR(map,rva) ((void *)((ULONG_PTR)(map) + (rva)))
35 typedef enum _MINIDUMP_TYPE
37 MiniDumpNormal
= 0x00000000,
38 MiniDumpWithDataSegs
= 0x00000001,
39 MiniDumpWithFullMemory
= 0x00000002,
40 MiniDumpWithHandleData
= 0x00000004,
41 MiniDumpFilterMemory
= 0x00000008,
42 MiniDumpScanMemory
= 0x00000010,
43 MiniDumpWithUnloadedModules
= 0x00000020,
44 MiniDumpWithIndirectlyReferencedMemory
= 0x00000040,
45 MiniDumpFilterModulePaths
= 0x00000080,
46 MiniDumpWithProcessThreadData
= 0x00000100,
47 MiniDumpWithPrivateReadWriteMemory
= 0x00000200,
48 MiniDumpWithoutOptionalData
= 0x00000400,
49 MiniDumpWithFullMemoryInfo
= 0x00000800,
50 MiniDumpWithThreadInfo
= 0x00001000,
51 MiniDumpWithCodeSegs
= 0x00002000,
53 MiniDumpWithoutAuxiliaryState
= 0x00004000,
54 MiniDumpWithFullAuxiliaryState
= 0x00008000,
55 MiniDumpWithPrivateWriteCopyMemory
= 0x00010000,
56 MiniDumpIgnoreInaccessibleMemory
= 0x00020000,
57 MiniDumpWithTokenInformation
= 0x00040000,
58 MiniDumpWithModuleHeaders
= 0x00080000,
59 MiniDumpFilterTriage
= 0x00100000,
60 MiniDumpWithAvxXStateContext
= 0x00200000,
61 MiniDumpWithIptTrace
= 0x00400000,
62 MiniDumpValidTypeFlags
= 0x007fffff,
65 typedef enum _MINIDUMP_SECONDARY_FLAGS
67 MiniSecondaryWithoutPowerInfo
= 0x00000001,
68 MiniSecondaryValidFlags
= 0x00000001,
69 } MINIDUMP_SECONDARY_FLAGS
;
71 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR
75 } MINIDUMP_LOCATION_DESCRIPTOR
;
77 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64
81 } MINIDUMP_LOCATION_DESCRIPTOR64
;
83 typedef struct _MINIDUMP_DIRECTORY
86 MINIDUMP_LOCATION_DESCRIPTOR Location
;
87 } MINIDUMP_DIRECTORY
, *PMINIDUMP_DIRECTORY
;
89 typedef struct _MINIDUMP_EXCEPTION
91 ULONG32 ExceptionCode
;
92 ULONG32 ExceptionFlags
;
93 ULONG64 ExceptionRecord
;
94 ULONG64 ExceptionAddress
;
95 ULONG32 NumberParameters
;
96 ULONG32 __unusedAlignment
;
97 ULONG64 ExceptionInformation
[EXCEPTION_MAXIMUM_PARAMETERS
];
98 } MINIDUMP_EXCEPTION
, *PMINIDUMP_EXCEPTION
;
100 typedef struct _MINIDUMP_EXCEPTION_INFORMATION
103 PEXCEPTION_POINTERS ExceptionPointers
;
105 } MINIDUMP_EXCEPTION_INFORMATION
, *PMINIDUMP_EXCEPTION_INFORMATION
;
107 typedef struct _MINIDUMP_EXCEPTION_INFORMATION64
110 ULONG64 ExceptionRecord
;
111 ULONG64 ContextRecord
;
113 } MINIDUMP_EXCEPTION_INFORMATION64
, *PMINIDUMP_EXCEPTION_INFORMATION64
;
115 typedef struct MINIDUMP_EXCEPTION_STREAM
119 MINIDUMP_EXCEPTION ExceptionRecord
;
120 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext
;
121 } MINIDUMP_EXCEPTION_STREAM
, *PMINIDUMP_EXCEPTION_STREAM
;
123 typedef struct _MINIDUMP_HEADER
127 ULONG32 NumberOfStreams
;
128 RVA StreamDirectoryRva
;
133 ULONG32 TimeDateStamp
;
136 } MINIDUMP_HEADER
, *PMINIDUMP_HEADER
;
138 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR
140 ULONG64 StartOfMemoryRange
;
141 MINIDUMP_LOCATION_DESCRIPTOR Memory
;
142 } MINIDUMP_MEMORY_DESCRIPTOR
, *PMINIDUMP_MEMORY_DESCRIPTOR
;
144 typedef struct _MINIDUMP_MEMORY_LIST
146 ULONG32 NumberOfMemoryRanges
;
147 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges
[1]; /* FIXME: 0-sized array not supported */
148 } MINIDUMP_MEMORY_LIST
, *PMINIDUMP_MEMORY_LIST
;
150 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR64
152 ULONG64 StartOfMemoryRange
;
154 } MINIDUMP_MEMORY_DESCRIPTOR64
, *PMINIDUMP_MEMORY_DESCRIPTOR64
;
156 typedef struct _MINIDUMP_MEMORY64_LIST
158 ULONG64 NumberOfMemoryRanges
;
160 MINIDUMP_MEMORY_DESCRIPTOR64 MemoryRanges
[1]; /* FIXME: 0-sized array not supported */
161 } MINIDUMP_MEMORY64_LIST
, *PMINIDUMP_MEMORY64_LIST
;
163 typedef struct _XSTATE_CONFIG_FEATURE_MSC_INFO
167 ULONG64 EnabledFeatures
;
168 XSTATE_FEATURE Features
[MAXIMUM_XSTATE_FEATURES
];
169 } XSTATE_CONFIG_FEATURE_MSC_INFO
, *PXSTATE_CONFIG_FEATURE_MSC_INFO
;
171 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001
172 #define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
173 #define MINIDUMP_MISC1_PROCESSOR_POWER_INFO 0x00000004
174 #define MINIDUMP_MISC3_PROCESS_INTEGRITY 0x00000010
175 #define MINIDUMP_MISC3_PROCESS_EXECUTE_FLAGS 0x00000020
176 #define MINIDUMP_MISC3_TIMEZONE 0x00000040
177 #define MINIDUMP_MISC3_PROTECTED_PROCESS 0x00000080
178 #define MINIDUMP_MISC4_BUILDSTRING 0x00000100
179 #define MINIDUMP_MISC5_PROCESS_COOKIE 0x00000200
181 typedef struct _MINIDUMP_MISC_INFO
186 ULONG32 ProcessCreateTime
;
187 ULONG32 ProcessUserTime
;
188 ULONG32 ProcessKernelTime
;
189 } MINIDUMP_MISC_INFO
, *PMINIDUMP_MISC_INFO
;
191 typedef struct _MINIDUMP_MISC_INFO_2
196 ULONG32 ProcessCreateTime
;
197 ULONG32 ProcessUserTime
;
198 ULONG32 ProcessKernelTime
;
199 ULONG32 ProcessorMaxMhz
;
200 ULONG32 ProcessorCurrentMhz
;
201 ULONG32 ProcessorMhzLimit
;
202 ULONG32 ProcessorMaxIdleState
;
203 ULONG32 ProcessorCurrentIdleState
;
204 } MINIDUMP_MISC_INFO_2
, *PMINIDUMP_MISC_INFO_2
;
206 typedef struct _MINIDUMP_MISC_INFO_3
211 ULONG32 ProcessCreateTime
;
212 ULONG32 ProcessUserTime
;
213 ULONG32 ProcessKernelTime
;
214 ULONG32 ProcessorMaxMhz
;
215 ULONG32 ProcessorCurrentMhz
;
216 ULONG32 ProcessorMhzLimit
;
217 ULONG32 ProcessorMaxIdleState
;
218 ULONG32 ProcessorCurrentIdleState
;
219 ULONG32 ProcessIntegrityLevel
;
220 ULONG32 ProcessExecuteFlags
;
221 ULONG32 ProtectedProcess
;
223 TIME_ZONE_INFORMATION TimeZone
;
224 } MINIDUMP_MISC_INFO_3
, *PMINIDUMP_MISC_INFO_3
;
226 typedef struct _MINIDUMP_MISC_INFO_4
231 ULONG32 ProcessCreateTime
;
232 ULONG32 ProcessUserTime
;
233 ULONG32 ProcessKernelTime
;
234 ULONG32 ProcessorMaxMhz
;
235 ULONG32 ProcessorCurrentMhz
;
236 ULONG32 ProcessorMhzLimit
;
237 ULONG32 ProcessorMaxIdleState
;
238 ULONG32 ProcessorCurrentIdleState
;
239 ULONG32 ProcessIntegrityLevel
;
240 ULONG32 ProcessExecuteFlags
;
241 ULONG32 ProtectedProcess
;
243 TIME_ZONE_INFORMATION TimeZone
;
244 WCHAR BuildString
[MAX_PATH
];
246 } MINIDUMP_MISC_INFO_4
, *PMINIDUMP_MISC_INFO_4
;
248 typedef struct _MINIDUMP_MISC_INFO_5
253 ULONG32 ProcessCreateTime
;
254 ULONG32 ProcessUserTime
;
255 ULONG32 ProcessKernelTime
;
256 ULONG32 ProcessorMaxMhz
;
257 ULONG32 ProcessorCurrentMhz
;
258 ULONG32 ProcessorMhzLimit
;
259 ULONG32 ProcessorMaxIdleState
;
260 ULONG32 ProcessorCurrentIdleState
;
261 ULONG32 ProcessIntegrityLevel
;
262 ULONG32 ProcessExecuteFlags
;
263 ULONG32 ProtectedProcess
;
265 TIME_ZONE_INFORMATION TimeZone
;
266 WCHAR BuildString
[MAX_PATH
];
268 XSTATE_CONFIG_FEATURE_MSC_INFO XStateData
;
269 ULONG32 ProcessCookie
;
270 } MINIDUMP_MISC_INFO_5
, *PMINIDUMP_MISC_INFO_5
;
272 typedef struct _MINIDUMP_MODULE
277 ULONG32 TimeDateStamp
;
279 VS_FIXEDFILEINFO VersionInfo
;
280 MINIDUMP_LOCATION_DESCRIPTOR CvRecord
;
281 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord
;
284 } MINIDUMP_MODULE
, *PMINIDUMP_MODULE
;
286 typedef struct _MINIDUMP_MODULE_LIST
288 ULONG32 NumberOfModules
;
289 MINIDUMP_MODULE Modules
[1]; /* FIXME: 0-sized array not supported */
290 } MINIDUMP_MODULE_LIST
, *PMINIDUMP_MODULE_LIST
;
292 typedef struct _MINIDUMP_STRING
295 WCHAR Buffer
[1]; /* FIXME: O-sized array not supported */
296 } MINIDUMP_STRING
, *PMINIDUMP_STRING
;
298 typedef union _CPU_INFORMATION
303 ULONG32 VersionInformation
;
304 ULONG32 FeatureInformation
;
305 ULONG32 AMDExtendedCpuFeatures
;
309 ULONG64 ProcessorFeatures
[2];
311 } CPU_INFORMATION
, *PCPU_INFORMATION
;
313 typedef struct _MINIDUMP_SYSTEM_INFO
315 USHORT ProcessorArchitecture
;
316 USHORT ProcessorLevel
;
317 USHORT ProcessorRevision
;
323 UCHAR NumberOfProcessors
;
328 ULONG32 MajorVersion
;
329 ULONG32 MinorVersion
;
344 } MINIDUMP_SYSTEM_INFO
, *PMINIDUMP_SYSTEM_INFO
;
346 typedef struct _MINIDUMP_THREAD
349 ULONG32 SuspendCount
;
350 ULONG32 PriorityClass
;
353 MINIDUMP_MEMORY_DESCRIPTOR Stack
;
354 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext
;
355 } MINIDUMP_THREAD
, *PMINIDUMP_THREAD
;
357 typedef struct _MINIDUMP_THREAD_LIST
359 ULONG32 NumberOfThreads
;
360 MINIDUMP_THREAD Threads
[1]; /* FIXME: no support of 0 sized array */
361 } MINIDUMP_THREAD_LIST
, *PMINIDUMP_THREAD_LIST
;
363 typedef struct _MINIDUMP_USER_STREAM
368 } MINIDUMP_USER_STREAM
, *PMINIDUMP_USER_STREAM
;
370 typedef struct _MINIDUMP_USER_STREAM_INFORMATION
372 ULONG32 UserStreamCount
;
373 PMINIDUMP_USER_STREAM UserStreamArray
;
374 } MINIDUMP_USER_STREAM_INFORMATION
, *PMINIDUMP_USER_STREAM_INFORMATION
;
376 typedef struct _MINIDUMP_HANDLE_DATA_STREAM
378 ULONG32 SizeOfHeader
;
379 ULONG32 SizeOfDescriptor
;
380 ULONG32 NumberOfDescriptors
;
382 } MINIDUMP_HANDLE_DATA_STREAM
, *PMINIDUMP_HANDLE_DATA_STREAM
;
384 typedef struct _MINIDUMP_HANDLE_DESCRIPTOR
390 ULONG32 GrantedAccess
;
392 ULONG32 PointerCount
;
393 } MINIDUMP_HANDLE_DESCRIPTOR
, *PMINIDUMP_HANDLE_DESCRIPTOR
;
395 typedef struct _MINIDUMP_HANDLE_DESCRIPTOR_2
401 ULONG32 GrantedAccess
;
403 ULONG32 PointerCount
;
406 } MINIDUMP_HANDLE_DESCRIPTOR_2
, *PMINIDUMP_HANDLE_DESCRIPTOR_2
;
408 typedef struct _MINIDUMP_THREAD_INFO
418 ULONG64 StartAddress
;
420 } MINIDUMP_THREAD_INFO
, *PMINIDUMP_THREAD_INFO
;
422 typedef struct _MINIDUMP_THREAD_INFO_LIST
426 ULONG NumberOfEntries
;
427 } MINIDUMP_THREAD_INFO_LIST
, *PMINIDUMP_THREAD_INFO_LIST
;
429 typedef struct _MINIDUMP_UNLOADED_MODULE
434 ULONG32 TimeDateStamp
;
436 } MINIDUMP_UNLOADED_MODULE
, *PMINIDUMP_UNLOADED_MODULE
;
438 typedef struct _MINIDUMP_UNLOADED_MODULE_LIST
440 ULONG32 SizeOfHeader
;
442 ULONG32 NumberOfEntries
;
443 } MINIDUMP_UNLOADED_MODULE_LIST
, *PMINIDUMP_UNLOADED_MODULE_LIST
;
445 typedef struct _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR
447 ULONG64 MinimumAddress
;
448 ULONG64 MaximumAddress
;
451 ULONG32 SizeOfAlignPad
;
452 } MINIDUMP_FUNCTION_TABLE_DESCRIPTOR
, *PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR
;
454 typedef struct _MINIDUMP_FUNCTION_TABLE_STREAM
456 ULONG32 SizeOfHeader
;
457 ULONG32 SizeOfDescriptor
;
458 ULONG32 SizeOfNativeDescriptor
;
459 ULONG32 SizeOfFunctionEntry
;
460 ULONG32 NumberOfDescriptors
;
461 ULONG32 SizeOfAlignPad
;
462 } MINIDUMP_FUNCTION_TABLE_STREAM
, *PMINIDUMP_FUNCTION_TABLE_STREAM
;
464 typedef struct _MINIDUMP_MEMORY_INFO
467 ULONG64 AllocationBase
;
468 ULONG32 AllocationProtect
;
469 ULONG32 __alignment1
;
474 ULONG32 __alignment2
;
475 } MINIDUMP_MEMORY_INFO
, *PMINIDUMP_MEMORY_INFO
;
477 typedef struct _MINIDUMP_MEMORY_INFO_LIST
481 ULONG64 NumberOfEntries
;
482 } MINIDUMP_MEMORY_INFO_LIST
, *PMINIDUMP_MEMORY_INFO_LIST
;
484 typedef struct _MINIDUMP_THREAD_NAME
487 RVA64 RvaOfThreadName
;
488 } MINIDUMP_THREAD_NAME
, *PMINIDUMP_THREAD_NAME
;
490 typedef struct _MINIDUMP_THREAD_NAME_LIST
492 ULONG NumberOfThreadNames
;
493 MINIDUMP_THREAD_NAME ThreadNames
[1]; /* FIXME: 0-sized array not supported */
494 } MINIDUMP_THREAD_NAME_LIST
, *PMINIDUMP_THREAD_NAME_LIST
;
496 typedef struct _MINIDUMP_TOKEN_INFO_HEADER
501 } MINIDUMP_TOKEN_INFO_HEADER
, *PMINIDUMP_TOKEN_INFO_HEADER
;
503 typedef struct _MINIDUMP_TOKEN_INFO_LIST
505 ULONG32 TokenListSize
;
506 ULONG32 TokenListEntries
;
507 ULONG32 ListHeaderSize
;
508 ULONG32 ElementHeaderSize
;
509 } MINIDUMP_TOKEN_INFO_LIST
, *PMINIDUMP_TOKEN_INFO_LIST
;
511 typedef struct _MINIDUMP_PROCESS_VM_COUNTERS_1
514 ULONG PageFaultCount
;
515 ULONG64 PeakWorkingSetSize
;
516 ULONG64 WorkingSetSize
;
517 ULONG64 QuotaPeakPagedPoolUsage
;
518 ULONG64 QuotaPagedPoolUsage
;
519 ULONG64 QuotaPeakNonPagedPoolUsage
;
520 ULONG64 QuotaNonPagedPoolUsage
;
521 ULONG64 PagefileUsage
;
522 ULONG64 PeakPagefileUsage
;
523 ULONG64 PrivateUsage
;
524 } MINIDUMP_PROCESS_VM_COUNTERS_1
, *PMINIDUMP_PROCESS_VM_COUNTERS_1
;
526 #define MINIDUMP_PROCESS_VM_COUNTERS 0x0001
527 #define MINIDUMP_PROCESS_VM_COUNTERS_VIRTUALSIZE 0x0002
528 #define MINIDUMP_PROCESS_VM_COUNTERS_EX 0x0004
529 #define MINIDUMP_PROCESS_VM_COUNTERS_EX2 0x0008
530 #define MINIDUMP_PROCESS_VM_COUNTERS_JOB 0x0010
532 typedef struct _MINIDUMP_PROCESS_VM_COUNTERS_2
536 ULONG PageFaultCount
;
537 ULONG64 PeakWorkingSetSize
;
538 ULONG64 WorkingSetSize
;
539 ULONG64 QuotaPeakPagedPoolUsage
;
540 ULONG64 QuotaPagedPoolUsage
;
541 ULONG64 QuotaPeakNonPagedPoolUsage
;
542 ULONG64 QuotaNonPagedPoolUsage
;
543 ULONG64 PagefileUsage
;
544 ULONG64 PeakPagefileUsage
;
545 ULONG64 PeakVirtualSize
;
547 ULONG64 PrivateUsage
;
548 ULONG64 PrivateWorkingSetSize
;
549 ULONG64 SharedCommitUsage
;
551 ULONG64 JobSharedCommitUsage
;
552 ULONG64 JobPrivateCommitUsage
;
553 ULONG64 JobPeakPrivateCommitUsage
;
554 ULONG64 JobPrivateCommitLimit
;
555 ULONG64 JobTotalCommitLimit
;
556 } MINIDUMP_PROCESS_VM_COUNTERS_2
, *PMINIDUMP_PROCESS_VM_COUNTERS_2
;
558 typedef struct _MINIDUMP_SYSTEM_BASIC_INFORMATION
560 ULONG TimerResolution
;
562 ULONG NumberOfPhysicalPages
;
563 ULONG LowestPhysicalPageNumber
;
564 ULONG HighestPhysicalPageNumber
;
565 ULONG AllocationGranularity
;
566 ULONG64 MinimumUserModeAddress
;
567 ULONG64 MaximumUserModeAddress
;
568 ULONG64 ActiveProcessorsAffinityMask
;
569 ULONG NumberOfProcessors
;
570 } MINIDUMP_SYSTEM_BASIC_INFORMATION
, *PMINIDUMP_SYSTEM_BASIC_INFORMATION
;
572 typedef struct _MINIDUMP_SYSTEM_FILECACHE_INFORMATION
576 ULONG PageFaultCount
;
577 ULONG64 MinimumWorkingSet
;
578 ULONG64 MaximumWorkingSet
;
579 ULONG64 CurrentSizeIncludingTransitionInPages
;
580 ULONG64 PeakSizeIncludingTransitionInPages
;
581 ULONG TransitionRePurposeCount
;
583 } MINIDUMP_SYSTEM_FILECACHE_INFORMATION
, *PMINIDUMP_SYSTEM_FILECACHE_INFORMATION
;
585 typedef struct _MINIDUMP_SYSTEM_BASIC_PERFORMANCE_INFORMATION
587 ULONG64 AvailablePages
;
588 ULONG64 CommittedPages
;
590 ULONG64 PeakCommitment
;
591 } MINIDUMP_SYSTEM_BASIC_PERFORMANCE_INFORMATION
, *PMINIDUMP_SYSTEM_BASIC_PERFORMANCE_INFORMATION
;
593 typedef struct _MINIDUMP_SYSTEM_PERFORMANCE_INFORMATION
{
594 ULONG64 IdleProcessTime
;
595 ULONG64 IoReadTransferCount
;
596 ULONG64 IoWriteTransferCount
;
597 ULONG64 IoOtherTransferCount
;
598 ULONG IoReadOperationCount
;
599 ULONG IoWriteOperationCount
;
600 ULONG IoOtherOperationCount
;
601 ULONG AvailablePages
;
602 ULONG CommittedPages
;
604 ULONG PeakCommitment
;
605 ULONG PageFaultCount
;
606 ULONG CopyOnWriteCount
;
607 ULONG TransitionCount
;
608 ULONG CacheTransitionCount
;
609 ULONG DemandZeroCount
;
611 ULONG PageReadIoCount
;
612 ULONG CacheReadCount
;
614 ULONG DirtyPagesWriteCount
;
615 ULONG DirtyWriteIoCount
;
616 ULONG MappedPagesWriteCount
;
617 ULONG MappedWriteIoCount
;
618 ULONG PagedPoolPages
;
619 ULONG NonPagedPoolPages
;
620 ULONG PagedPoolAllocs
;
621 ULONG PagedPoolFrees
;
622 ULONG NonPagedPoolAllocs
;
623 ULONG NonPagedPoolFrees
;
624 ULONG FreeSystemPtes
;
625 ULONG ResidentSystemCodePage
;
626 ULONG TotalSystemDriverPages
;
627 ULONG TotalSystemCodePages
;
628 ULONG NonPagedPoolLookasideHits
;
629 ULONG PagedPoolLookasideHits
;
630 ULONG AvailablePagedPoolPages
;
631 ULONG ResidentSystemCachePage
;
632 ULONG ResidentPagedPoolPage
;
633 ULONG ResidentSystemDriverPage
;
634 ULONG CcFastReadNoWait
;
635 ULONG CcFastReadWait
;
636 ULONG CcFastReadResourceMiss
;
637 ULONG CcFastReadNotPossible
;
638 ULONG CcFastMdlReadNoWait
;
639 ULONG CcFastMdlReadWait
;
640 ULONG CcFastMdlReadResourceMiss
;
641 ULONG CcFastMdlReadNotPossible
;
642 ULONG CcMapDataNoWait
;
644 ULONG CcMapDataNoWaitMiss
;
645 ULONG CcMapDataWaitMiss
;
646 ULONG CcPinMappedDataCount
;
647 ULONG CcPinReadNoWait
;
649 ULONG CcPinReadNoWaitMiss
;
650 ULONG CcPinReadWaitMiss
;
651 ULONG CcCopyReadNoWait
;
652 ULONG CcCopyReadWait
;
653 ULONG CcCopyReadNoWaitMiss
;
654 ULONG CcCopyReadWaitMiss
;
655 ULONG CcMdlReadNoWait
;
657 ULONG CcMdlReadNoWaitMiss
;
658 ULONG CcMdlReadWaitMiss
;
659 ULONG CcReadAheadIos
;
660 ULONG CcLazyWriteIos
;
661 ULONG CcLazyWritePages
;
664 ULONG ContextSwitches
;
665 ULONG FirstLevelTbFills
;
666 ULONG SecondLevelTbFills
;
669 ULONG64 CcTotalDirtyPages
;
670 ULONG64 CcDirtyPageThreshold
;
672 LONG64 ResidentAvailablePages
;
673 ULONG64 SharedCommittedPages
;
674 } MINIDUMP_SYSTEM_PERFORMANCE_INFORMATION
, *PMINIDUMP_SYSTEM_PERFORMANCE_INFORMATION
;
676 #define MINIDUMP_SYSMEMINFO1_FILECACHE_TRANSITIONREPURPOSECOUNT_FLAGS 0x0001
677 #define MINIDUMP_SYSMEMINFO1_BASICPERF 0x0002
678 #define MINIDUMP_SYSMEMINFO1_PERF_CCTOTALDIRTYPAGES_CCDIRTYPAGETHRESHOLD 0x0004
679 #define MINIDUMP_SYSMEMINFO1_PERF_RESIDENTAVAILABLEPAGES_SHAREDCOMMITPAGES 0x0008
681 typedef struct _MINIDUMP_SYSTEM_MEMORY_INFO_1
686 MINIDUMP_SYSTEM_BASIC_INFORMATION BasicInfo
;
687 MINIDUMP_SYSTEM_FILECACHE_INFORMATION FileCacheInfo
;
688 MINIDUMP_SYSTEM_BASIC_PERFORMANCE_INFORMATION BasicPerfInfo
;
689 MINIDUMP_SYSTEM_PERFORMANCE_INFORMATION PerfInfo
;
690 } MINIDUMP_SYSTEM_MEMORY_INFO_1
, *PMINIDUMP_SYSTEM_MEMORY_INFO_1
;
692 typedef MINIDUMP_SYSTEM_MEMORY_INFO_1 MINIDUMP_SYSTEM_MEMORY_INFO_N
;
693 typedef MINIDUMP_SYSTEM_MEMORY_INFO_N
*PMINIDUMP_SYSTEM_MEMORY_INFO_N
;
695 typedef enum _MINIDUMP_CALLBACK_TYPE
700 IncludeThreadCallback
,
701 IncludeModuleCallback
,
704 WriteKernelMinidumpCallback
,
705 KernelMinidumpStatusCallback
,
706 RemoveMemoryCallback
,
707 IncludeVmRegionCallback
,
711 ReadMemoryFailureCallback
,
712 SecondaryFlagsCallback
,
713 IsProcessSnapshotCallback
,
718 } MINIDUMP_CALLBACK_TYPE
;
720 typedef struct _MINIDUMP_THREAD_CALLBACK
724 #if defined(__aarch64__)
731 } MINIDUMP_THREAD_CALLBACK
, *PMINIDUMP_THREAD_CALLBACK
;
733 typedef struct _MINIDUMP_THREAD_EX_CALLBACK
737 #if defined(__aarch64__)
744 ULONG64 BackingStoreBase
;
745 ULONG64 BackingStoreEnd
;
746 } MINIDUMP_THREAD_EX_CALLBACK
, *PMINIDUMP_THREAD_EX_CALLBACK
;
748 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK
751 } MINIDUMP_INCLUDE_THREAD_CALLBACK
, *PMINIDUMP_INCLUDE_THREAD_CALLBACK
;
753 typedef enum _THREAD_WRITE_FLAGS
755 ThreadWriteThread
= 0x0001,
756 ThreadWriteStack
= 0x0002,
757 ThreadWriteContext
= 0x0004,
758 ThreadWriteBackingStore
= 0x0008,
759 ThreadWriteInstructionWindow
= 0x0010,
760 ThreadWriteThreadData
= 0x0020,
761 ThreadWriteThreadInfo
= 0x0040
762 } THREAD_WRITE_FLAGS
;
764 typedef struct _MINIDUMP_MODULE_CALLBACK
771 VS_FIXEDFILEINFO VersionInfo
;
773 ULONG SizeOfCvRecord
;
775 ULONG SizeOfMiscRecord
;
776 } MINIDUMP_MODULE_CALLBACK
, *PMINIDUMP_MODULE_CALLBACK
;
778 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK
781 } MINIDUMP_INCLUDE_MODULE_CALLBACK
, *PMINIDUMP_INCLUDE_MODULE_CALLBACK
;
783 typedef enum _MODULE_WRITE_FLAGS
785 ModuleWriteModule
= 0x0001,
786 ModuleWriteDataSeg
= 0x0002,
787 ModuleWriteMiscRecord
= 0x0004,
788 ModuleWriteCvRecord
= 0x0008,
789 ModuleReferencedByMemory
= 0x0010,
790 ModuleWriteTlsData
= 0x0020,
791 ModuleWriteCodeSegs
= 0x0040,
792 } MODULE_WRITE_FLAGS
;
794 typedef struct _MINIDUMP_IO_CALLBACK
800 } MINIDUMP_IO_CALLBACK
, *PMINIDUMP_IO_CALLBACK
;
802 typedef struct _MINIDUMP_READ_MEMORY_FAILURE_CALLBACK
806 HRESULT FailureStatus
;
807 } MINIDUMP_READ_MEMORY_FAILURE_CALLBACK
, *PMINIDUMP_READ_MEMORY_FAILURE_CALLBACK
;
809 typedef struct _MINIDUMP_VM_QUERY_CALLBACK
812 } MINIDUMP_VM_QUERY_CALLBACK
, *PMINIDUMP_VM_QUERY_CALLBACK
;
814 typedef struct _MINIDUMP_VM_PRE_READ_CALLBACK
819 } MINIDUMP_VM_PRE_READ_CALLBACK
, *PMINIDUMP_VM_PRE_READ_CALLBACK
;
821 typedef struct _MINIDUMP_VM_POST_READ_CALLBACK
828 } MINIDUMP_VM_POST_READ_CALLBACK
, *PMINIDUMP_VM_POST_READ_CALLBACK
;
830 typedef struct _MINIDUMP_CALLBACK_INPUT
833 HANDLE ProcessHandle
;
838 MINIDUMP_THREAD_CALLBACK Thread
;
839 MINIDUMP_THREAD_EX_CALLBACK ThreadEx
;
840 MINIDUMP_MODULE_CALLBACK Module
;
841 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread
;
842 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule
;
843 MINIDUMP_IO_CALLBACK Io
;
844 MINIDUMP_READ_MEMORY_FAILURE_CALLBACK ReadMemoryFailure
;
845 ULONG SecondaryFlags
;
846 MINIDUMP_VM_QUERY_CALLBACK VmQuery
;
847 MINIDUMP_VM_PRE_READ_CALLBACK VmPreRead
;
848 MINIDUMP_VM_POST_READ_CALLBACK VmPostRead
;
850 } MINIDUMP_CALLBACK_INPUT
, *PMINIDUMP_CALLBACK_INPUT
;
852 typedef struct _MINIDUMP_CALLBACK_OUTPUT
856 ULONG ModuleWriteFlags
;
857 ULONG ThreadWriteFlags
;
858 ULONG SecondaryFlags
;
872 MINIDUMP_MEMORY_INFO VmRegion
;
877 HRESULT VmQueryStatus
;
878 MINIDUMP_MEMORY_INFO VmQueryResult
;
882 HRESULT VmReadStatus
;
883 ULONG VmReadBytesCompleted
;
887 } MINIDUMP_CALLBACK_OUTPUT
, *PMINIDUMP_CALLBACK_OUTPUT
;
889 typedef BOOL (WINAPI
* MINIDUMP_CALLBACK_ROUTINE
)(PVOID
, const PMINIDUMP_CALLBACK_INPUT
, PMINIDUMP_CALLBACK_OUTPUT
);
891 typedef struct _MINIDUMP_CALLBACK_INFORMATION
893 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine
;
895 } MINIDUMP_CALLBACK_INFORMATION
, *PMINIDUMP_CALLBACK_INFORMATION
;
897 typedef enum _MINIDUMP_STREAM_TYPE
902 ThreadListStream
= 3,
903 ModuleListStream
= 4,
904 MemoryListStream
= 5,
906 SystemInfoStream
= 7,
907 ThreadExListStream
= 8,
908 Memory64ListStream
= 9,
911 HandleDataStream
= 12,
912 FunctionTableStream
= 13,
913 UnloadedModuleListStream
= 14,
915 MemoryInfoListStream
= 16,
916 ThreadInfoListStream
= 17,
917 HandleOperationListStream
= 18,
919 JavaScriptDataStream
= 20,
920 SystemMemoryInfoStream
= 21,
921 ProcessVmCountersStream
= 22,
923 ThreadNamesStream
= 24,
925 LastReservedStream
= 0xffff
926 } MINIDUMP_STREAM_TYPE
;
928 BOOL WINAPI
MiniDumpWriteDump(HANDLE process
, DWORD pid
, HANDLE hfile
, MINIDUMP_TYPE dumptype
,
929 PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam
, PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam
,
930 PMINIDUMP_CALLBACK_INFORMATION CallbackParam
);
931 BOOL WINAPI
MiniDumpReadDumpStream(PVOID base
, ULONG index
, PMINIDUMP_DIRECTORY
*dir
, void **streamptr
,
940 #endif /* __WINE_MINIDUMP_H */