ReactOS 0.4.15-dev-7942-gd23573b
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
49CODE_SEG("INIT")
50VOID
53 VOID
54);
55
56VOID
60 IN PVOID StartAddress
61);
62
63VOID
67);
68
69VOID
73);
74
75VOID
78 IN PVOID Section,
82);
83
84VOID
88);
89
93 VOID
94);
95
96VOID
99 VOID
100);
101
103NTAPI
105 IN OUT PDBGKM_MSG ApiMsg,
106 IN BOOLEAN SuspendProcess
107);
108
109HANDLE
110NTAPI
112 IN PVOID Section
113);
114
115VOID
116NTAPI
120);
121
123NTAPI
125 IN PEXCEPTION_RECORD ExceptionRecord,
126 IN BOOLEAN DebugPort,
127 IN BOOLEAN SecondChance
128);
129
131NTAPI
134 IN PDEBUG_OBJECT SourceDebugObject
135);
136
138NTAPI
142 OUT HANDLE *DebugHandle
143);
144
147
148/* EOF */
#define CODE_SEG(...)
unsigned char BOOLEAN
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx 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:732
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI DbgkCopyProcessDebugPort(IN PEPROCESS Process, IN PEPROCESS Parent)
Definition: dbgkobj.c:276
VOID NTAPI DbgkUnMapViewOfSection(IN PVOID BaseAddress)
Definition: dbgkutil.c:436
VOID NTAPI DbgkMapViewOfSection(IN PVOID Section, IN PVOID BaseAddress, IN ULONG SectionOffset, IN ULONG_PTR ViewSize)
Definition: dbgkutil.c:380
VOID NTAPI DbgkCreateThread(IN PETHREAD Thread, IN PVOID StartAddress)
Definition: dbgkutil.c:87
VOID NTAPI DbgkExitThread(IN NTSTATUS ExitStatus)
Definition: dbgkutil.c:340
NTSTATUS NTAPI DbgkOpenProcessDebugPort(IN PEPROCESS Process, IN KPROCESSOR_MODE PreviousMode, OUT HANDLE *DebugHandle)
Definition: dbgkobj.c:1526
HANDLE NTAPI DbgkpSectionToFileHandle(IN PVOID Section)
Definition: dbgkutil.c:19
ULONG DbgkpTraceLevel
Definition: dbgkobj.c:17
BOOLEAN NTAPI DbgkForwardException(IN PEXCEPTION_RECORD ExceptionRecord, IN BOOLEAN DebugPort, IN BOOLEAN SecondChance)
Definition: dbgkobj.c:317
POBJECT_TYPE DbgkDebugObjectType
Definition: dbgkobj.c:15
NTSTATUS NTAPI DbgkClearProcessDebugObject(IN PEPROCESS Process, IN PDEBUG_OBJECT SourceDebugObject)
Definition: dbgkobj.c:1410
NTSTATUS NTAPI DbgkpSendApiMessage(IN OUT PDBGKM_MSG ApiMsg, IN BOOLEAN SuspendProcess)
Definition: dbgkobj.c:242
VOID NTAPI DbgkInitialize(VOID)
Definition: dbgkobj.c:1498
VOID NTAPI DbgkpResumeProcess(VOID)
Definition: dbgkutil.c:77
BOOLEAN NTAPI DbgkpSuspendProcess(VOID)
Definition: dbgkutil.c:57
VOID NTAPI DbgkExitProcess(IN NTSTATUS ExitStatus)
Definition: dbgkutil.c:304
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER SectionOffset
Definition: mmfuncs.h:407
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
Definition: mmfuncs.h:408
_In_ NTSTATUS ExitStatus
Definition: psfuncs.h:867
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103