Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

kd.h

Go to the documentation of this file.
00001 /*++ BUILD Version: 0006 // Increment this if a change has global effects 00002 00003 Copyright (c) 1989 Microsoft Corporation 00004 00005 Module Name: 00006 00007 kd.h 00008 00009 Abstract: 00010 00011 This module contains the public data structures and procedure 00012 prototypes for the Kernel Debugger sub-component of NTOS. 00013 00014 Author: 00015 00016 Mike O'Leary (mikeol) 29-June-1989 00017 00018 Revision History: 00019 00020 --*/ 00021 00022 #ifndef _KD_ 00023 #define _KD_ 00024 00025 // begin_nthal 00026 // 00027 // Status Constants for reading data from comport 00028 // 00029 00030 #define CP_GET_SUCCESS 0 00031 #define CP_GET_NODATA 1 00032 #define CP_GET_ERROR 2 00033 00034 // end_nthal 00035 00036 // 00037 // Debug constants for FreezeFlag 00038 // 00039 00040 #define FREEZE_BACKUP 0x0001 00041 #define FREEZE_SKIPPED_PROCESSOR 0x0002 00042 #define FREEZE_FROZEN 0x0004 00043 00044 00045 // 00046 // System Initialization procedure for KD subcomponent of NTOS 00047 // 00048 00049 BOOLEAN 00050 KdInitSystem( 00051 IN PLOADER_PARAMETER_BLOCK LoaderBlock, 00052 BOOLEAN StopInDebugger 00053 ); 00054 00055 BOOLEAN 00056 KdEnterDebugger( 00057 IN PKTRAP_FRAME TrapFrame, 00058 IN PKEXCEPTION_FRAME ExceptionFrame 00059 ); 00060 00061 VOID 00062 KdExitDebugger( 00063 IN BOOLEAN Enable 00064 ); 00065 00066 extern BOOLEAN KdPitchDebugger; 00067 00068 BOOLEAN 00069 KdPollBreakIn ( 00070 VOID 00071 ); 00072 00073 BOOLEAN 00074 KdIsThisAKdTrap ( 00075 IN PEXCEPTION_RECORD ExceptionRecord, 00076 IN PCONTEXT ContextRecord, 00077 IN KPROCESSOR_MODE PreviousMode 00078 ); 00079 00080 VOID 00081 KdSetOwedBreakpoints( 00082 VOID 00083 ); 00084 00085 VOID 00086 KdDeleteAllBreakpoints( 00087 VOID 00088 ); 00089 00090 00091 // 00092 // Data structure for passing information to KdpReportLoadSymbolsStateChange 00093 // function via the debug trap 00094 // 00095 00096 typedef struct _KD_SYMBOLS_INFO { 00097 IN PVOID BaseOfDll; 00098 IN ULONG_PTR ProcessId; 00099 IN ULONG CheckSum; 00100 IN ULONG SizeOfImage; 00101 } KD_SYMBOLS_INFO, *PKD_SYMBOLS_INFO; 00102 00103 00104 // begin_nthal 00105 // 00106 // Defines the debug port parameters for kernel debugger 00107 // CommunicationPort - specify which COM port to use as debugging port 00108 // 0 - use default; N - use COM N. 00109 // BaudRate - the baud rate used to initialize debugging port 00110 // 0 - use default rate. 00111 // 00112 00113 typedef struct _DEBUG_PARAMETERS { 00114 ULONG CommunicationPort; 00115 ULONG BaudRate; 00116 } DEBUG_PARAMETERS, *PDEBUG_PARAMETERS; 00117 00118 // end_nthal 00119 00120 // begin_ntddk begin_wdm begin_nthal begin_ntifs 00121 // 00122 // Define external data. 00123 // because of indirection for all drivers external to ntoskrnl these are actually ptrs 00124 // 00125 00126 #if defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) || defined(_WDMDDK_) 00127 00128 extern PBOOLEAN KdDebuggerNotPresent; 00129 extern PBOOLEAN KdDebuggerEnabled; 00130 00131 #else 00132 00133 extern BOOLEAN KdDebuggerNotPresent; 00134 extern BOOLEAN KdDebuggerEnabled; 00135 00136 #endif 00137 00138 00139 00140 // end_ntddk end_wdm end_nthal end_ntifs 00141 00142 extern DEBUG_PARAMETERS KdDebugParameters; 00143 00144 // 00145 // This event is provided by the time service. The debugger 00146 // signals the event when the system time has slipped due 00147 // to debugger activity. 00148 // 00149 00150 VOID 00151 KdUpdateTimeSlipEvent( 00152 PVOID Event 00153 ); 00154 00155 00156 // 00157 // Let PS update data in the KdDebuggerDataBlock 00158 // 00159 00160 VOID 00161 KdUpdateDataBlock(VOID); 00162 00163 ULONG_PTR KdGetDataBlock(VOID); 00164 00165 // begin_ntddk begin_nthal begin_ntifs 00166 00167 typedef struct _DBGKD_DEBUG_DATA_HEADER64 *PDBGKD_DEBUG_DATA_HEADER64; 00168 00169 BOOLEAN 00170 KdRegisterDebuggerDataBlock( 00171 IN ULONG Tag, 00172 IN PDBGKD_DEBUG_DATA_HEADER64 DataHeader, 00173 IN ULONG Size 00174 ); 00175 00176 VOID 00177 KdDeregisterDebuggerDataBlock32( 00178 IN PDBGKD_DEBUG_DATA_HEADER64 DataHeader 00179 ); 00180 00181 VOID 00182 KdDisableDebugger( 00183 VOID 00184 ); 00185 00186 VOID 00187 KdEnableDebugger( 00188 VOID 00189 ); 00190 00191 // end_ntddk end_nthal end_ntifs 00192 00193 // 00194 // DbgPrint strings will always be logged to a circular buffer, 00195 // even if FLG_DISABLE_DBGPRINT is set. This function may be called 00196 // directly by the debugger service trap handler even when the debugger 00197 // is not enabled. 00198 // 00199 00200 #if DBG 00201 #define KDPRINTBUFFERSIZE 32768 00202 #else 00203 #define KDPRINTBUFFERSIZE 4096 00204 #endif 00205 00206 VOID 00207 KdLogDbgPrint( 00208 IN PSTRING String 00209 ); 00210 00211 #endif // _KD_

Generated on Sat May 15 19:40:33 2004 for test by doxygen 1.3.7