28#define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]) - 1)
33 while (*p1 ==
' ') ++p1;
56 PCHAR p1, p2 = Currentp2;
104 while (*p2 !=
'\0' && *p2 !=
' ') p2++;
125 CommandLine = LoaderBlock->LoadOptions;
143 Port +=
sizeof(
"DEBUGPORT") - 1;
192 DPRINT(
"*** KD %sREINITIALIZATION - Phase %d ***\n",
193 Context ?
"" :
"BOOT ", BootPhase);
204 CurrentEntry = CurrentEntry->
Flink;
212 CurrentTable->
InitStatus = KdpInitRoutine(CurrentTable, BootPhase);
213 DPRINT(
"KdpInitRoutine(%p) returned 0x%08lx\n",
217 ScheduleReinit = (ScheduleReinit || CurrentTable->
KdpInitRoutine);
221 DPRINT(
"ScheduleReinit: %s\n", ScheduleReinit ?
"TRUE" :
"FALSE");
247 DPRINT(
"Cannot reinitialize anymore!\n");
248 ScheduleReinit =
FALSE;
349 CurrentEntry = CurrentEntry->
Flink;
357 CurrentTable->
InitStatus = KdpInitRoutine(CurrentTable, 1);
361 ReinitForPhase2 = (ReinitForPhase2 || CurrentTable->
KdpInitRoutine);
370 if (!ReinitForPhase2)
char * strstr(char *String1, char *String2)
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
char * strchr(const char *String, int ch)
#define NT_SUCCESS(StatCode)
#define _strnicmp(_String1, _String2, _MaxCount)
#define InterlockedExchangePointer(Target, Value)
#define KeGetCurrentIrql()
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
NTHALAPI VOID NTAPI HalDisplayString(PUCHAR String)
_Check_return_ long __cdecl atol(_In_z_ const char *_Str)
#define FLG_STOP_ON_EXCEPTION
char _InterlockedCompareExchange8(_Interlocked_operand_ char volatile *_Destination, char _Exchange, char _Comparand)
KDP_DEBUG_MODE KdpDebugMode
PKDP_INIT_ROUTINE InitRoutines[KdMax]
NTSTATUS(NTAPI * PKDP_INIT_ROUTINE)(_In_ struct _KD_DISPATCH_TABLE *DispatchTable, _In_ ULONG BootPhase)
ANSI_STRING KdpLogFileName
static PCHAR KdpGetDebugMode(_In_ PCHAR Currentp2)
NTSTATUS NTAPI KdD0Transition(VOID)
NTSTATUS NTAPI KdD3Transition(VOID)
NTSTATUS NTAPI KdDebuggerInitialize0(_In_opt_ PLOADER_PARAMETER_BLOCK LoaderBlock)
static VOID NTAPI KdpDriverReinit(_In_ PDRIVER_OBJECT DriverObject, _In_opt_ PVOID Context, _In_ ULONG Count)
Reinitialization routine. DRIVER_REINITIALIZE.
static VOID KdpGetTerminalSettings(_In_ PCSTR p1)
static NTSTATUS NTAPI KdpDriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath)
Entry point for the auxiliary driver. DRIVER_INITIALIZE.
NTSTATUS NTAPI KdRestore(_In_ BOOLEAN SleepTransition)
static pHalInitPnpDriver orgHalInitPnpDriver
Hooked HalInitPnpDriver() callback. It is initially set by the HAL when HalInitSystem(0,...
static NTSTATUS NTAPI KdpInitDriver(VOID)
HalInitPnpDriver() callback hook installed by KdDebuggerInitialize1().
NTSTATUS NTAPI KdSave(_In_ BOOLEAN SleepTransition)
NTSTATUS NTAPI KdDebuggerInitialize1(_In_opt_ PLOADER_PARAMETER_BLOCK LoaderBlock)
#define UNREFERENCED_PARAMETER(P)
VOID NTAPI IoRegisterDriverReinitialization(IN PDRIVER_OBJECT DriverObject, IN PDRIVER_REINITIALIZE ReinitRoutine, IN PVOID Context)
NTSTATUS NTAPI IoCreateDriver(_In_opt_ PUNICODE_STRING DriverName, _In_ PDRIVER_INITIALIZE InitializationFunction)
VOID NTAPI IoDeleteDriver(_In_ PDRIVER_OBJECT DriverObject)
VOID NTAPI IoRegisterBootDriverReinitialization(IN PDRIVER_OBJECT DriverObject, IN PDRIVER_REINITIALIZE ReinitRoutine, IN PVOID Context)
VOID NTAPI ObMakeTemporaryObject(IN PVOID ObjectBody)
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
PKDP_INIT_ROUTINE KdpInitRoutine
struct _LIST_ENTRY * Flink
#define RTL_CONSTANT_STRING(s)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_UNSUCCESSFUL
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_In_ PWDFDEVICE_INIT _In_ PWDF_PDO_EVENT_CALLBACKS DispatchTable
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
NTSTATUS(NTAPI * pHalInitPnpDriver)(VOID)