@@ -63,7 +63,7 @@ MiniDumper::MiniDumper()
6363{
6464 m_miniDumpInitialized = false ;
6565 m_loadedDbgHelp = false ;
66- m_requestedDumpType = DUMP_TYPE_MINIMAL ;
66+ m_requestedDumpType = DumpType_Minimal ;
6767 m_dumpRequested = NULL ;
6868 m_dumpComplete = NULL ;
6969 m_quitting = NULL ;
@@ -234,9 +234,9 @@ Bool MiniDumper::InitializeDumpDirectory(const AsciiString& userDirPath)
234234 }
235235
236236 // Clean up old files (we keep a maximum of 10 small, 2 extended and 2 full)
237- KeepNewestFiles (m_dumpDir, DUMP_TYPE_GAMEMEMORY , MaxExtendedFileCount);
238- KeepNewestFiles (m_dumpDir, DUMP_TYPE_FULL , MaxFullFileCount);
239- KeepNewestFiles (m_dumpDir, DUMP_TYPE_MINIMAL , MaxMiniFileCount);
237+ KeepNewestFiles (m_dumpDir, DumpType_Gamememory , MaxExtendedFileCount);
238+ KeepNewestFiles (m_dumpDir, DumpType_Full , MaxFullFileCount);
239+ KeepNewestFiles (m_dumpDir, DumpType_Minimal , MaxMiniFileCount);
240240
241241 return true ;
242242}
@@ -256,7 +256,7 @@ void MiniDumper::ShutdownDumpThread()
256256 break ;
257257 case WAIT_TIMEOUT:
258258 DEBUG_LOG ((" MiniDumper::ShutdownDumpThread: Waiting for dumping thread to exit timed out, killing thread" , waitRet));
259- ::TerminateThread (m_dumpThread, DUMPER_EXIT_FORCED_TERMINATE );
259+ ::TerminateThread (m_dumpThread, MiniDumperExitCode_ForcedTerminate );
260260 break ;
261261 case WAIT_FAILED:
262262 DEBUG_LOG ((" MiniDumper::ShutdownDumpThread: Waiting for minidump triggering failed: status=%u, error=%u" , waitRet, ::GetLastError ()));
@@ -323,13 +323,13 @@ DWORD MiniDumper::ThreadProcInternal()
323323 break ;
324324 case WAIT_OBJECT_0 + 1 :
325325 // Quit (m_quitting)
326- return DUMPER_EXIT_SUCCESS ;
326+ return MiniDumperExitCode_Success ;
327327 case WAIT_FAILED:
328328 DEBUG_LOG ((" MiniDumper::ThreadProcInternal: Waiting for events failed: status=%u, error=%u" , event, ::GetLastError ()));
329- return DUMPER_EXIT_FAILURE_WAIT ;
329+ return MiniDumperExitCode_FailureWait ;
330330 default :
331331 DEBUG_LOG ((" MiniDumper::ThreadProcInternal: Waiting for events failed: status=%u" , event));
332- return DUMPER_EXIT_FAILURE_WAIT ;
332+ return MiniDumperExitCode_FailureWait ;
333333 }
334334 }
335335}
@@ -339,7 +339,7 @@ DWORD WINAPI MiniDumper::MiniDumpThreadProc(LPVOID lpParam)
339339 if (lpParam == NULL )
340340 {
341341 DEBUG_LOG ((" MiniDumper::MiniDumpThreadProc: The provided parameter was NULL, exiting thread." ));
342- return DUMPER_EXIT_FAILURE_PARAM ;
342+ return MiniDumperExitCode_FailureParam ;
343343 }
344344
345345 MiniDumper* dumper = static_cast <MiniDumper *>(lpParam);
@@ -387,7 +387,7 @@ void MiniDumper::CreateMiniDump(DumpType dumpType)
387387
388388 PMINIDUMP_CALLBACK_INFORMATION callbackInfoPtr = NULL ;
389389 MINIDUMP_CALLBACK_INFORMATION callBackInfo = { 0 };
390- if (dumpType == DUMP_TYPE_GAMEMEMORY )
390+ if (dumpType == DumpType_Gamememory )
391391 {
392392 callBackInfo.CallbackRoutine = MiniDumpCallback;
393393 callBackInfo.CallbackParam = this ;
@@ -397,13 +397,13 @@ void MiniDumper::CreateMiniDump(DumpType dumpType)
397397 int dumpTypeFlags = MiniDumpNormal;
398398 switch (dumpType)
399399 {
400- case DUMP_TYPE_FULL :
400+ case DumpType_Full :
401401 dumpTypeFlags |= MiniDumpWithFullMemory;
402402 FALLTHROUGH;
403- case DUMP_TYPE_GAMEMEMORY :
403+ case DumpType_Gamememory :
404404 dumpTypeFlags |= MiniDumpWithDataSegs | MiniDumpWithHandleData | MiniDumpWithThreadInfo | MiniDumpWithFullMemoryInfo | MiniDumpWithPrivateReadWriteMemory;
405405 FALLTHROUGH;
406- case DUMP_TYPE_MINIMAL :
406+ case DumpType_Minimal :
407407 dumpTypeFlags |= MiniDumpWithIndirectlyReferencedMemory | MiniDumpScanMemory;
408408 break ;
409409 }
@@ -525,7 +525,7 @@ void MiniDumper::DumpMemoryObjects(ULONG64& memoryBase, ULONG& memorySize)
525525 switch (m_dumpObjectsState)
526526 {
527527 case DumpObjectsState_Begin:
528- m_dumpObjectsState = DumpObjectsState_Memory_Pools ;
528+ m_dumpObjectsState = DumpObjectsState_MemoryPools ;
529529 if (TheMemoryPoolFactory)
530530 {
531531 m_currentPool = TheMemoryPoolFactory->getFirstMemoryPool ();
@@ -535,13 +535,13 @@ void MiniDumper::DumpMemoryObjects(ULONG64& memoryBase, ULONG& memorySize)
535535 m_currentSingleBlock = m_currentAllocator->getFirstRawBlock ();
536536 }
537537 break ;
538- case DumpObjectsState_Memory_Pools :
538+ case DumpObjectsState_MemoryPools :
539539 {
540540 // Dump all the MemoryPool instances in TheMemoryPoolFactory
541541 // This only dumps the metadata, not the actual MemoryPool contents (done in the next phase).
542542 if (m_currentPool == NULL )
543543 {
544- m_dumpObjectsState = DumpObjectsState_Memory_Pool_Allocations ;
544+ m_dumpObjectsState = DumpObjectsState_MemoryPoolAllocations ;
545545 break ;
546546 }
547547
@@ -550,13 +550,13 @@ void MiniDumper::DumpMemoryObjects(ULONG64& memoryBase, ULONG& memorySize)
550550 m_currentPool = m_currentPool->getNextPoolInList ();
551551 break ;
552552 }
553- case DumpObjectsState_Memory_Pool_Allocations :
553+ case DumpObjectsState_MemoryPoolAllocations :
554554 {
555555 // Iterate through all the allocations of memory pools and containing blobs that has been done via the memory pool factory
556556 // and include all of the storage space allocated for objects
557557 if (!TheMemoryPoolFactory || m_rangeIter == TheMemoryPoolFactory->cend ())
558558 {
559- m_dumpObjectsState = DumpObjectsState_DMA_Allocations ;
559+ m_dumpObjectsState = DumpObjectsState_DMAAllocations ;
560560 break ;
561561 }
562562
@@ -565,7 +565,7 @@ void MiniDumper::DumpMemoryObjects(ULONG64& memoryBase, ULONG& memorySize)
565565 ++m_rangeIter;
566566 break ;
567567 }
568- case DumpObjectsState_DMA_Allocations :
568+ case DumpObjectsState_DMAAllocations :
569569 {
570570 // Iterate through all the direct allocations ("raw blocks") done by DMAs, as these are done outside of the
571571 // memory pool factory allocations dumped in the previous phase.
@@ -575,7 +575,7 @@ void MiniDumper::DumpMemoryObjects(ULONG64& memoryBase, ULONG& memorySize)
575575 break ;
576576 }
577577
578- MemoryPoolAllocatedRange rawBlockRange = { 0 } ;
578+ MemoryPoolAllocatedRange rawBlockRange;
579579 m_currentAllocator->fillAllocationRangeForRawBlock (m_currentSingleBlock, rawBlockRange);
580580 memoryBase = reinterpret_cast <ULONG64>(rawBlockRange.allocationAddr );
581581 memorySize = rawBlockRange.allocationSize ;
0 commit comments