typedef struct _DEBUG_EVENT { /* de */
DWORD dwDebugEventCode;
DWORD dwProcessId;
DWORD dwThreadId;
union {
EXCEPTION_DEBUG_INFO Exception;
CREATE_THREAD_DEBUG_INFO CreateThread;
CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
EXIT_THREAD_DEBUG_INFO ExitThread;
EXIT_PROCESS_DEBUG_INFO ExitProcess;
LOAD_DLL_DEBUG_INFO LoadDll;
UNLOAD_DLL_DEBUG_INFO UnloadDll;
OUTPUT_DEBUG_STRING_INFO DebugString;
} u;
} DEBUG_EVENT, *LPDEBUG_EVENT;
The DEBUG_EVENT structure contains the details of a debugging event.
dwDebugEventCode
Specifies a debugging event code that identifies the type of debugging event. Valid values of this field include:
Value | Meaning |
EXCEPTION_DEBUG_EVENT | The debugging event structure is reporting the occurrence of an exception debugging event. The value of u.Exception specifies an EXCEPTION_DEBUG_INFO structure. |
The EXCEPTION_DEBUG_INFO structure has the following format: | |
typedef struct _EXCEPTION_DEBUG_INFO { /* exdi */ EXCEPTION_RECORD ExceptionRecord; DWORD dwFirstChance; } EXCEPTION_DEBUG_INFO *LPEXCEPTION_DEBUG_INFO; |
|
CREATE_THREAD_DEBUG_EVENT | The debugging event structure is reporting the occurrence of a create thread debugging event. The value of u.CreateThread specifies a CREATE_THREAD_DEBUG_INFO. |
The CREATE_THREAD_DEBUG_INFO structure has the following format: | |
typedef struct _CREATE_THREAD_DEBUG_INFO { /* ctdi */ HANDLE hThread; LPTHREAD_START_ROUTINE lpStartAddress; } CREATE_THREAD_DEBUG_INFO *LPCREATE_THREAD_DEBUG_INFO; |
|
CREATE_PROCESS_DEBUG_EVENT | The debugging event structure is reporting the occurrence of a create process debugging event. The value of u.CreateProcess specifies a CREATE_PROCESS_DEBUG_INFO structure. |
The CREATE_PROCESS_DEBUG_INFO structure has the following format: | |
typedef struct _CREATE_PROCESS_DEBUG_INFO { /* cpdi */ HANDLE hFile; HANDLE hProcess; HANDLE hThread; LPVOID lpBaseOfImage; DWORD dwDebugInfoFileOffset; DWORD nDebugInfoSize; LPTHREAD_START_ROUTINE lpStartAddress; } CREATE_PROCESS_DEBUG_INFO; |
|
EXIT_THREAD_DEBUG_EVENT | The debugging event structure is reporting the occurrence of an exit thread debugging event. The value of u.ExitThread specifies an EXIT_THREAD_DEBUG_INFO structure. |
The EXIT_THREAD_DEBUG_INFO structure has the following format: | |
typedef struct _EXIT_THREAD_DEBUG_INFO { /* etdi */ DWORD dwExitCode; } EXIT_THREAD_DEBUG_INFO *LPEXIT_THREAD_DEBUG_INFO; |
|
EXIT_PROCESS_DEBUG_EVENT | The debugging event structure is reporting the occurrence of an exit process debugging event. The value of u.ExitProcess specifies an EXIT_PROCESS_DEBUG_INFO structure. |
The EXIT_PROCESS_DEBUG_INFO structure has the following format: | |
typedef struct _EXIT_PROCESS_DEBUG_INFO { /* epdi */ DWORD dwExitCode; } EXIT_PROCESS_DEBUG_INFO *LPEXIT_PROCESS_DEBUG_INFO; |
|
LOAD_DLL_DEBUG_EVENT | The debugging event structure is reporting the occurrence of a load DLL debugging event. The value of u.LoadDll specifies a LOAD_DLL_DEBUG_INFO structure. |
The LOAD_DLL_DEBUG_INFO structure has the following format: | |
typedef struct _LOAD_DLL_DEBUG_INFO { /* lddi */ HANDLE hFile; LPVOID lpBaseOfDll; DWORD dwDebugInfoFileOffset; DWORD nDebugInfoSize; } LOAD_DLL_DEBUG_INFO *LPLOAD_DLL_DEBUG_INFO; |
|
UNLOAD_DLL_DEBUG_EVENT | The debugging event structure is reporting the occurrence of an unload DLL debugging event. The value of u.UnloadDll specifies an UNLOAD_DLL_DEBUG_INFO structure. |
The UNLOAD_DLL_DEBUG_INFO structure has the following format: | |
typedef struct _UNLOAD_DLL_DEBUG_INFO { /* uddi */ LPVOID lpBaseOfDll; } UNLOAD_DLL_DEBUG_INFO *LPUNLOAD_DLL_DEBUG_INFO; |
|
OUTPUT_DEBUG_STRING_EVENT | The debugging event structure is reporting the occurrence of an output debugging string debugging event. The value of u.DebugString specifies an OUTPUT_DEBUG_STRING_INFO structure. |
The OUTPUT_DEBUG_STRING_INFO structure has the following format: | |
typedef struct _OUTPUT_DEBUG_STRING_INFO { /* odsi */ LPSTR lpDebugStringData; WORD fUnicode; WORD nDebugStringLength; } OUTPUT_DEBUG_STRING_INFO *LPOUTPUT_DEBUG_STRING_INFO; |
dwProcessId
Specifies the ID of the process in which the debugging event occurred. A debugger uses this value to locate the debugger's per-process data structure. The debugger cannot assume that these values are small integers that can be used as table indexes.
dwThreadId
Specifies the ID of the thread in which the debugging event occurred. A debugger uses this value o locate the debugger's per-thread data structure. The debugger cannot assume that these values are small integers that can be used as table indexes.
u
Specifies additional information relating to the debugging event. This union will take on the type and value that is appropriate to the type of debugging event, as indicated above.
If successful, the WaitForDebugEvent function fills in the fields of a DEBUG_EVENT structure.
WaitForDebugEvent