ReactOS  0.4.15-dev-439-g292f67a
dbgk.h
Go to the documentation of this file.
1 /*
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)
7  */
8 
9 //
10 // Define this if you want debugging support
11 //
12 #define _DBGK_DEBUG_ 0x00
13 
14 //
15 // These define the Debug Masks Supported
16 //
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
22 
23 //
24 // Debug/Tracing support
25 //
26 #if _DBGK_DEBUG_
27 #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
28 #define DBGKTRACE(x, ...) \
29  { \
30  DbgPrintEx("%s [%.16s] - ", \
31  __FUNCTION__, \
32  PsGetCurrentProcess()->ImageFileName); \
33  DbgPrintEx(__VA_ARGS__); \
34  }
35 #else
36 #define DBGKTRACE(x, ...) \
37  if (x & DbgkpTraceLevel) \
38  { \
39  DbgPrint("%s [%.16s] - ", \
40  __FUNCTION__, \
41  PsGetCurrentProcess()->ImageFileName); \
42  DbgPrint(__VA_ARGS__); \
43  }
44 #endif
45 #else
46 #define DBGKTRACE(x, fmt, ...) DPRINT(fmt, ##__VA_ARGS__)
47 #endif
48 
49 INIT_FUNCTION
50 VOID
51 NTAPI
53  VOID
54 );
55 
56 VOID
57 NTAPI
60  IN PVOID StartAddress
61 );
62 
63 VOID
64 NTAPI
67 );
68 
69 VOID
70 NTAPI
73 );
74 
75 VOID
76 NTAPI
78  IN PVOID Section,
82 );
83 
84 VOID
85 NTAPI
88 );
89 
90 BOOLEAN
91 NTAPI
93  VOID
94 );
95 
96 VOID
97 NTAPI
99  VOID
100 );
101 
102 NTSTATUS
103 NTAPI
105  IN OUT PDBGKM_MSG ApiMsg,
106  IN BOOLEAN SuspendProcess
107 );
108 
109 HANDLE
110 NTAPI
112  IN PVOID Section
113 );
114 
115 VOID
116 NTAPI
120 );
121 
122 BOOLEAN
123 NTAPI
125  IN PEXCEPTION_RECORD ExceptionRecord,
126  IN BOOLEAN DebugPort,
127  IN BOOLEAN SecondChance
128 );
129 
130 NTSTATUS
131 NTAPI
134  IN PDEBUG_OBJECT SourceDebugObject
135 );
136 
137 NTSTATUS
138 NTAPI
142  OUT HANDLE *DebugHandle
143 );
144 
145 extern ULONG DbgkpTraceLevel;
147 
148 /* EOF */
#define IN
Definition: typedefs.h:39
VOID NTAPI DbgkUnMapViewOfSection(IN PVOID BaseAddress)
Definition: dbgkutil.c:436
HANDLE NTAPI DbgkpSectionToFileHandle(IN PVOID Section)
Definition: dbgkutil.c:19
VOID NTAPI DbgkExitThread(IN NTSTATUS ExitStatus)
Definition: dbgkutil.c:340
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI DbgkOpenProcessDebugPort(IN PEPROCESS Process, IN KPROCESSOR_MODE PreviousMode, OUT HANDLE *DebugHandle)
Definition: dbgkobj.c:1526
VOID NTAPI DbgkExitProcess(IN NTSTATUS ExitStatus)
Definition: dbgkutil.c:304
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:728
uint32_t ULONG_PTR
Definition: typedefs.h:64
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
VOID NTAPI DbgkMapViewOfSection(IN PVOID Section, IN PVOID BaseAddress, IN ULONG SectionOffset, IN ULONG_PTR ViewSize)
Definition: dbgkutil.c:380
BOOLEAN NTAPI DbgkpSuspendProcess(VOID)
Definition: dbgkutil.c:57
unsigned char BOOLEAN
VOID NTAPI DbgkpResumeProcess(VOID)
Definition: dbgkutil.c:77
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER SectionOffset
Definition: mmfuncs.h:404
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
ULONG DbgkpTraceLevel
Definition: dbgkobj.c:17
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
INIT_FUNCTION VOID NTAPI DbgkInitialize(VOID)
Definition: dbgkobj.c:1498
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
NTSTATUS NTAPI DbgkpSendApiMessage(IN OUT PDBGKM_MSG ApiMsg, IN BOOLEAN SuspendProcess)
Definition: dbgkobj.c:242
VOID NTAPI DbgkCreateThread(IN PETHREAD Thread, IN PVOID StartAddress)
Definition: dbgkutil.c:87
_In_ NTSTATUS ExitStatus
Definition: psfuncs.h:859
NTSTATUS NTAPI DbgkClearProcessDebugObject(IN PEPROCESS Process, IN PDEBUG_OBJECT SourceDebugObject)
Definition: dbgkobj.c:1410
POBJECT_TYPE DbgkDebugObjectType
Definition: dbgkobj.c:15
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
BOOLEAN NTAPI DbgkForwardException(IN PEXCEPTION_RECORD ExceptionRecord, IN BOOLEAN DebugPort, IN BOOLEAN SecondChance)
Definition: dbgkobj.c:317
#define OUT
Definition: typedefs.h:40
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
Definition: mmfuncs.h:404
unsigned int ULONG
Definition: retypes.h:1
VOID NTAPI DbgkCopyProcessDebugPort(IN PEPROCESS Process, IN PEPROCESS Parent)
Definition: dbgkobj.c:276