2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/include/internal/dbgk.h
5 * PURPOSE: Internal header for the User-Mode Debugging Backend
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
10 // Define this if you want debugging support
12 #define _DBGK_DEBUG_ 0x00
15 // These define the Debug Masks Supported
17 #define DBGK_THREAD_DEBUG 0x01
18 #define DBGK_PROCESS_DEBUG 0x02
19 #define DBGK_OBJECT_DEBUG 0x04
20 #define DBGK_MESSAGE_DEBUG 0x08
21 #define DBGK_EXCEPTION_DEBUG 0x10
24 // Debug/Tracing support
27 #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
28 #define DBGKTRACE(x, ...) \
30 DbgPrintEx("%s [%.16s] - ", \
32 PsGetCurrentProcess()->ImageFileName); \
33 DbgPrintEx(__VA_ARGS__); \
36 #define DBGKTRACE(x, ...) \
37 if (x & DbgkpTraceLevel) \
39 DbgPrint("%s [%.16s] - ", \
41 PsGetCurrentProcess()->ImageFileName); \
42 DbgPrint(__VA_ARGS__); \
46 #define DBGKTRACE(x, fmt, ...) DPRINT(fmt, ##__VA_ARGS__)
65 IN NTSTATUS ExitStatus
71 IN NTSTATUS ExitStatus
79 IN ULONG SectionOffset
,
85 DbgkUnMapViewOfSection(
104 IN OUT PDBGKM_MSG ApiMsg
,
105 IN BOOLEAN SuspendProcess
110 DbgkpSectionToFileHandle(
116 DbgkCopyProcessDebugPort(
117 IN PEPROCESS Process
,
123 DbgkForwardException(
124 IN PEXCEPTION_RECORD ExceptionRecord
,
125 IN BOOLEAN DebugPort
,
126 IN BOOLEAN SecondChance
131 DbgkClearProcessDebugObject(
132 IN PEPROCESS Process
,
133 IN PDEBUG_OBJECT SourceDebugObject
138 DbgkOpenProcessDebugPort(
139 IN PEPROCESS Process
,
140 IN KPROCESSOR_MODE PreviousMode
,
141 OUT HANDLE
*DebugHandle
144 extern ULONG DbgkpTraceLevel
;
145 extern POBJECT_TYPE DbgkDebugObjectType
;