MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / CreateMiniDump

Function CreateMiniDump

Tools/MiniDump.cpp:42–66  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

40
41 //-----------------------------------------------------------------------------
42 void CreateMiniDump(
43 MINIDUMP_EXCEPTION_INFORMATION& minidumpInfo,
44 HANDLE hFile,
45 const wchar_t* dmpFilename)
46 {
47 auto miniDumpType = GetMiniDumpDefaultType();
48
49 std::wcerr << L"\tTrying to create memory dump..." << std::endl;
50 if (MiniDumpWriteDump(
51 GetCurrentProcess(),
52 GetCurrentProcessId(),
53 hFile,
54 miniDumpType,
55 &minidumpInfo,
56 nullptr,
57 nullptr))
58 {
59 std::wcerr << "\tMemory dump created successfully: " << dmpFilename << std::endl;
60 std::wcerr << "\tPlease create a new issue on ";
61 std::wcerr << "https://github.com/OpenCppCoverage/OpenCppCoverage/issues and attached the memory dump ";
62 std::wcerr << dmpFilename << std::endl;
63 }
64 else
65 std::cerr << "\tFailed to create memory dump." << std::endl;
66 }
67
68 //-----------------------------------------------------------------------------
69 LONG WINAPI CreateMiniDumpOnUnHandledException(PEXCEPTION_POINTERS exceptionInfo)

Callers 1

Calls 1

GetMiniDumpDefaultTypeFunction · 0.85

Tested by

no test coverage detected