Fix indentation, remove trailing whitespace and sort prototypes.
[reactos.git] / reactos / include / ndk / dbgktypes.h
1 /*
2 * PROJECT: ReactOS Native Headers
3 * FILE: include/ndk/dbgktypes.h
4 * PURPOSE: Definitions for User-Mode Kernel Debugging not in DDK/IFS
5 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
6 * UPDATE HISTORY:
7 * Created 25/06/05
8 */
9
10 #ifndef _DBGKTYPES_H
11 #define _DBGKTYPES_H
12
13 /* DEPENDENCIES **************************************************************/
14
15 /* EXPORTED DATA *************************************************************/
16
17 /* CONSTANTS *****************************************************************/
18 #define DEBUG_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x0F)
19 #define DEBUG_OBJECT_WAIT_STATE_CHANGE 0x0001
20 #define DEBUG_OBJECT_ADD_REMOVE_PROCESS 0x0002
21
22 /* ENUMERATIONS **************************************************************/
23
24 typedef enum _DEBUGOBJECTINFOCLASS
25 {
26 DebugObjectUnusedInformation,
27 DebugObjectKillProcessOnExitInformation
28 } DEBUGOBJECTINFOCLASS, *PDEBUGOBJECTINFOCLASS;
29
30 /* TYPES *********************************************************************/
31
32 typedef struct _DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION
33 {
34 ULONG KillProcessOnExit;
35 } DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION, *
36 PDEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION;
37
38 typedef struct _DBGK_DEBUG_OBJECT
39 {
40 KEVENT Event;
41 FAST_MUTEX Mutex;
42 LIST_ENTRY StateEventListEntry;
43 union
44 {
45 ULONG Flags;
46 struct
47 {
48 UCHAR DebuggerInactive :1;
49 UCHAR KillProcessOnExit :1;
50 };
51 };
52 } DBGK_DEBUG_OBJECT, *PDBGK_DEBUG_OBJECT;
53
54 typedef enum _DBG_STATE
55 {
56 DbgIdle,
57 DbgReplyPending,
58 DbgCreateThreadStateChange,
59 DbgCreateProcessStateChange,
60 DbgExitThreadStateChange,
61 DbgExitProcessStateChange,
62 DbgExceptionStateChange,
63 DbgBreakpointStateChange,
64 DbgSingleStepStateChange,
65 DbgLoadDllStateChange,
66 DbgUnloadDllStateChange
67 } DBG_STATE, *PDBG_STATE;
68
69 typedef struct _DBGKM_EXCEPTION
70 {
71 EXCEPTION_RECORD ExceptionRecord;
72 ULONG FirstChance;
73 } DBGKM_EXCEPTION, *PDBGKM_EXCEPTION;
74
75 typedef struct _DBGKM_CREATE_THREAD
76 {
77 ULONG SubSystemKey;
78 PVOID StartAddress;
79 } DBGKM_CREATE_THREAD, *PDBGKM_CREATE_THREAD;
80
81 typedef struct _DBGKM_CREATE_PROCESS
82 {
83 ULONG SubSystemKey;
84 HANDLE FileHandle;
85 PVOID BaseOfImage;
86 ULONG DebugInfoFileOffset;
87 ULONG DebugInfoSize;
88 DBGKM_CREATE_THREAD InitialThread;
89 } DBGKM_CREATE_PROCESS, *PDBGKM_CREATE_PROCESS;
90
91 typedef struct _DBGKM_EXIT_THREAD
92 {
93 NTSTATUS ExitStatus;
94 } DBGKM_EXIT_THREAD, *PDBGKM_EXIT_THREAD;
95
96 typedef struct _DBGKM_EXIT_PROCESS
97 {
98 NTSTATUS ExitStatus;
99 } DBGKM_EXIT_PROCESS, *PDBGKM_EXIT_PROCESS;
100
101 typedef struct _DBGKM_LOAD_DLL
102 {
103 HANDLE FileHandle;
104 PVOID BaseOfDll;
105 ULONG DebugInfoFileOffset;
106 ULONG DebugInfoSize;
107 } DBGKM_LOAD_DLL, *PDBGKM_LOAD_DLL;
108
109 typedef struct _DBGKM_UNLOAD_DLL
110 {
111 PVOID BaseAddress;
112 } DBGKM_UNLOAD_DLL, *PDBGKM_UNLOAD_DLL;
113
114 typedef struct _DBGUI_WAIT_STATE_CHANGE
115 {
116 DBG_STATE NewState;
117 CLIENT_ID AppClientId;
118 union
119 {
120 struct
121 {
122 HANDLE HandleToThread;
123 DBGKM_CREATE_THREAD NewThread;
124 } CreateThread;
125 struct
126 {
127 HANDLE HandleToProcess;
128 HANDLE HandleToThread;
129 DBGKM_CREATE_PROCESS NewProcess;
130 } CreateProcessInfo;
131 DBGKM_EXIT_THREAD ExitThread;
132 DBGKM_EXIT_PROCESS ExitProcess;
133 DBGKM_EXCEPTION Exception;
134 DBGKM_LOAD_DLL LoadDll;
135 DBGKM_UNLOAD_DLL UnloadDll;
136 } StateInfo;
137 } DBGUI_WAIT_STATE_CHANGE, *PDBGUI_WAIT_STATE_CHANGE;
138
139 #endif