-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_engine.h
More file actions
60 lines (50 loc) · 1.69 KB
/
Copy pathdebug_engine.h
File metadata and controls
60 lines (50 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include <Windows.h>
#include <string>
#include <vector>
#include <map>
struct DebugInformationValidationResult
{
bool isDebugBuild = false;
bool hasPdbFile = false;
std::string pdbFilePath = "";
std::string errorMessage = "";
};
struct VariableInformation
{
std::string variableName = "";
std::string typeName = "";
DWORD64 address = 0;
DWORD size = 0;
std::string valueRepresentation = "";
};
struct StackFrameInformation
{
int frameIndex = 0;
std::string moduleName = "";
std::string functionName = "";
std::string sourceFilePath = "";
int sourceLineNumber = 0;
DWORD64 displacement = 0;
DWORD64 instructionOffset = 0;
std::vector<VariableInformation> localVariables;
};
struct CrashReportData
{
DWORD targetProcessIdentifier = 0;
DWORD faultingThreadIdentifier = 0;
DWORD exceptionCode = 0;
std::string exceptionDescription = "";
DWORD64 faultingAddress = 0;
std::string timestampString = "";
std::string minidumpFilePath = "";
std::string reportJsonFilePath = "";
std::string reportLogFilePath = "";
std::map<std::string, std::string> cpuRegisters;
std::vector<StackFrameInformation> callStackTrace;
};
DebugInformationValidationResult validateDynamicLinkLibraryDebugInfo(const std::string &dynamicLinkLibraryPath);
bool runCrashDebuggerSession(DWORD targetProcessIdentifier, const std::string &targetModulePath, const std::string &outputDirectoryPath, CrashReportData &outputReport);
bool resumeTargetProcess(DWORD targetProcessIdentifier);
bool terminateTargetProcess(DWORD targetProcessIdentifier);
std::vector<std::string> listAvailableCrashReports(const std::string &reportsDirectoryPath);