|
3 | 3 |
|
4 | 4 | namespace ReClassNET.Debugger |
5 | 5 | { |
6 | | - public enum DebugEventType |
7 | | - { |
8 | | - CreateProcess, |
9 | | - ExitProcess, |
10 | | - CreateThread, |
11 | | - ExitThread, |
12 | | - LoadDll, |
13 | | - UnloadDll, |
14 | | - Exception |
15 | | - } |
16 | | - |
17 | | - [StructLayout(LayoutKind.Sequential, Pack = 1)] |
18 | | - public struct CreateProcessDebugInfo |
19 | | - { |
20 | | - public IntPtr FileHandle; |
21 | | - |
22 | | - public IntPtr ProcessHandle; |
23 | | - }; |
24 | | - |
25 | | - [StructLayout(LayoutKind.Sequential, Pack = 1)] |
26 | | - public struct ExitProcessDebugInfo |
27 | | - { |
28 | | - public IntPtr ExitCode; |
29 | | - }; |
30 | | - |
31 | | - [StructLayout(LayoutKind.Sequential, Pack = 1)] |
32 | | - public struct CreateThreadDebugInfo |
33 | | - { |
34 | | - public IntPtr ThreadHandle; |
35 | | - }; |
36 | | - |
37 | | - [StructLayout(LayoutKind.Sequential, Pack = 1)] |
38 | | - public struct ExitThreadDebugInfo |
39 | | - { |
40 | | - public IntPtr ExitCode; |
41 | | - }; |
42 | | - |
43 | | - [StructLayout(LayoutKind.Sequential, Pack = 1)] |
44 | | - public struct LoadDllDebugInfo |
45 | | - { |
46 | | - public IntPtr FileHandle; |
47 | | - |
48 | | - public IntPtr BaseOfDll; |
49 | | - }; |
50 | | - |
51 | | - [StructLayout(LayoutKind.Sequential, Pack = 1)] |
52 | | - public struct UnloadDllDebugInfo |
53 | | - { |
54 | | - public IntPtr BaseOfDll; |
55 | | - }; |
56 | | - |
57 | 6 | [StructLayout(LayoutKind.Sequential, Pack = 1)] |
58 | 7 | public struct ExceptionDebugInfo |
59 | 8 | { |
60 | 9 | public IntPtr ExceptionCode; |
61 | 10 | public IntPtr ExceptionFlags; |
62 | 11 | public IntPtr ExceptionAddress; |
| 12 | + |
63 | 13 | public HardwareBreakpointRegister CausedBy; |
| 14 | + |
| 15 | + [MarshalAs(UnmanagedType.I1)] |
64 | 16 | public bool IsFirstChance; |
65 | 17 |
|
66 | 18 | [StructLayout(LayoutKind.Sequential, Pack = 1)] |
@@ -108,46 +60,13 @@ public enum DebugContinueStatus |
108 | 60 | } |
109 | 61 |
|
110 | 62 | [StructLayout(LayoutKind.Sequential, Pack = 1)] |
111 | | - public struct DebugEventHeader |
| 63 | + public struct DebugEvent |
112 | 64 | { |
113 | 65 | public DebugContinueStatus ContinueStatus; |
114 | 66 |
|
115 | 67 | public IntPtr ProcessId; |
116 | 68 | public IntPtr ThreadId; |
117 | 69 |
|
118 | | - public DebugEventType Type; |
119 | | - } |
120 | | - |
121 | | - [StructLayout(LayoutKind.Explicit, Pack = 1)] |
122 | | - public struct DebugEventUnion |
123 | | - { |
124 | | - [FieldOffset(0)] |
125 | | - public CreateProcessDebugInfo CreateProcessInfo; |
126 | | - [FieldOffset(0)] |
127 | | - public ExitProcessDebugInfo ExitProcessInfo; |
128 | | - [FieldOffset(0)] |
129 | | - public CreateThreadDebugInfo CreateThreadInfo; |
130 | | - [FieldOffset(0)] |
131 | | - public ExitThreadDebugInfo ExitThreadInfo; |
132 | | - [FieldOffset(0)] |
133 | | - public LoadDllDebugInfo LoadDllInfo; |
134 | | - [FieldOffset(0)] |
135 | | - public UnloadDllDebugInfo UnloadDllInfo; |
136 | | - [FieldOffset(0)] |
137 | 70 | public ExceptionDebugInfo ExceptionInfo; |
138 | 71 | } |
139 | | - |
140 | | - [StructLayout(LayoutKind.Explicit, Pack = 1)] |
141 | | - public struct DebugEvent |
142 | | - { |
143 | | - [FieldOffset(0)] |
144 | | - public DebugEventHeader Header; |
145 | | - |
146 | | -#if WIN64 |
147 | | - [FieldOffset(24)] |
148 | | -#else |
149 | | - [FieldOffset(16)] |
150 | | -#endif |
151 | | - public DebugEventUnion Data; |
152 | | - } |
153 | 72 | } |
0 commit comments