- Always include kd64.h
- Change KdpPrompt() prototype to be compatible between KDBG and _WINDK_
- Rename KdComponentTable to KdpComponentTable to prevent a conflict
- Add some functions stubs and global variables
/* Update progress bar */
InbvUpdateProgressBar(25);
/* Update progress bar */
InbvUpdateProgressBar(25);
/* No KD Time Slip is pending */
KdpTimeSlipPending = 0;
/* No KD Time Slip is pending */
KdpTimeSlipPending = 0;
/* Initialize in-place execution support */
XIPInit(LoaderBlock);
/* Initialize in-place execution support */
XIPInit(LoaderBlock);
_In_ ULONG Length,
_In_ KPROCESSOR_MODE PreviousMode);
_In_ ULONG Length,
_In_ KPROCESSOR_MODE PreviousMode);
-ULONG
-NTAPI
-KdpPrompt(
- _In_reads_bytes_(InStringLength) PCHAR UnsafeInString,
- _In_ USHORT InStringLength,
- _Out_writes_bytes_(OutStringLength) PCHAR UnsafeOutString,
- _In_ USHORT OutStringLength,
- _In_ KPROCESSOR_MODE PreviousMode
-);
-
BOOLEAN
NTAPI
KdpDetectConflicts(PCM_RESOURCE_LIST DriverList);
BOOLEAN
NTAPI
KdpDetectConflicts(PCM_RESOURCE_LIST DriverList);
#include "po.h"
#include "se.h"
#include "ldr.h"
#include "po.h"
#include "se.h"
#include "ldr.h"
-#ifndef _WINKD_
-#include "kd.h"
-#else
#include "fsrtl.h"
#include "lpc.h"
#include "rtl.h"
#include "fsrtl.h"
#include "lpc.h"
#include "rtl.h"
BOOLEAN KdIgnoreUmExceptions = FALSE;
KD_CONTEXT KdpContext;
ULONG Kd_WIN2000_Mask;
BOOLEAN KdIgnoreUmExceptions = FALSE;
KD_CONTEXT KdpContext;
ULONG Kd_WIN2000_Mask;
+LONG KdpTimeSlipPending;
+KDDEBUGGER_DATA64 KdDebuggerDataBlock;
VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads);
typedef struct
VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads);
typedef struct
ULONG Level;
} KD_COMPONENT_DATA;
#define MAX_KD_COMPONENT_TABLE_ENTRIES 128
ULONG Level;
} KD_COMPONENT_DATA;
#define MAX_KD_COMPONENT_TABLE_ENTRIES 128
-KD_COMPONENT_DATA KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES];
+KD_COMPONENT_DATA KdpComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES];
ULONG KdComponentTableEntries = 0;
ULONG Kd_DEFAULT_MASK = 1 << DPFLTR_ERROR_LEVEL;
ULONG KdComponentTableEntries = 0;
ULONG Kd_DEFAULT_MASK = 1 << DPFLTR_ERROR_LEVEL;
ExceptionInformation[2],
OutString,
OutStringLength,
ExceptionInformation[2],
OutString,
OutStringLength,
+ PreviousMode,
+ TrapFrame,
+ ExceptionFrame);
/* Return the number of characters that we received */
Context->Eax = ReturnValue;
/* Return the number of characters that we received */
Context->Eax = ReturnValue;
/* PUBLIC FUNCTIONS *********************************************************/
/* PUBLIC FUNCTIONS *********************************************************/
+VOID
+NTAPI
+KdUpdateDataBlock(VOID)
+{
+}
+
+NTSTATUS
+NTAPI
+KdEnableDebuggerWithLock(IN BOOLEAN NeedLock)
+{
+ return STATUS_ACCESS_DENIED;
+}
+
for (i = 0; i < KdComponentTableEntries; i++)
{
/* Check if it is the right component */
for (i = 0; i < KdComponentTableEntries; i++)
{
/* Check if it is the right component */
- if (ComponentId == KdComponentTable[i].ComponentId)
+ if (ComponentId == KdpComponentTable[i].ComponentId)
{
/* Check if mask are matching */
{
/* Check if mask are matching */
- return (Level & KdComponentTable[i].Level) ? TRUE : FALSE;
+ return (Level & KdpComponentTable[i].Level) ? TRUE : FALSE;
/* Search for an existing entry */
for (i = 0; i < KdComponentTableEntries; i++ )
{
/* Search for an existing entry */
for (i = 0; i < KdComponentTableEntries; i++ )
{
- if (ComponentId == KdComponentTable[i].ComponentId)
+ if (ComponentId == KdpComponentTable[i].ComponentId)
/* Add a new entry */
++KdComponentTableEntries;
/* Add a new entry */
++KdComponentTableEntries;
- KdComponentTable[i].ComponentId = ComponentId;
- KdComponentTable[i].Level = Kd_DEFAULT_MASK;
+ KdpComponentTable[i].ComponentId = ComponentId;
+ KdpComponentTable[i].Level = Kd_DEFAULT_MASK;
}
/* Update entry table */
if (State)
}
/* Update entry table */
if (State)
- KdComponentTable[i].Level |= Level;
+ KdpComponentTable[i].Level |= Level;
- KdComponentTable[i].Level &= ~Level;
+ KdpComponentTable[i].Level &= ~Level;
+#include "internal/kd.h"
/* DEFINES *******************************************************************/
/* DEFINES *******************************************************************/
STRING KdpPromptString = RTL_CONSTANT_STRING("kdb:> ");
extern KSPIN_LOCK KdpSerialSpinLock;
STRING KdpPromptString = RTL_CONSTANT_STRING("kdb:> ");
extern KSPIN_LOCK KdpSerialSpinLock;
NTAPI
KdpPrompt(
_In_reads_bytes_(InStringLength) PCHAR UnsafeInString,
_In_ USHORT InStringLength,
_Out_writes_bytes_(OutStringLength) PCHAR UnsafeOutString,
_In_ USHORT OutStringLength,
NTAPI
KdpPrompt(
_In_reads_bytes_(InStringLength) PCHAR UnsafeInString,
_In_ USHORT InStringLength,
_Out_writes_bytes_(OutStringLength) PCHAR UnsafeOutString,
_In_ USHORT OutStringLength,
- _In_ KPROCESSOR_MODE PreviousMode)
+ _In_ KPROCESSOR_MODE PreviousMode,
+ _In_ PKTRAP_FRAME TrapFrame,
+ _In_ PKEXCEPTION_FRAME ExceptionFrame)
{
USHORT i;
CHAR Response;
{
USHORT i;
CHAR Response;
}
/* Check if we need to save the context for KD */
}
/* Check if we need to save the context for KD */
if (!KdPitchDebugger) KdDebuggerDataBlock.SavedContext = (ULONG_PTR)&Context;
if (!KdPitchDebugger) KdDebuggerDataBlock.SavedContext = (ULONG_PTR)&Context;
/* Check if a debugger is connected */
if ((BugCheckCode != MANUALLY_INITIATED_CRASH) && (KdDebuggerEnabled))
/* Check if a debugger is connected */
if ((BugCheckCode != MANUALLY_INITIATED_CRASH) && (KdDebuggerEnabled))
if (!(KdDebuggerEnabled) && !(KdPitchDebugger))
{
/* Enable it */
if (!(KdDebuggerEnabled) && !(KdPitchDebugger))
{
/* Enable it */
KdEnableDebuggerWithLock(FALSE);
KdEnableDebuggerWithLock(FALSE);
KeBugCheckEx(PROCESS1_INITIALIZATION_FAILED, Status, 8, 0, 0);
}
KeBugCheckEx(PROCESS1_INITIALIZATION_FAILED, Status, 8, 0, 0);
}
/* Let KD know we are done */
KdUpdateDataBlock();
/* Let KD know we are done */
KdUpdateDataBlock();
/* Return status */
return Status;
/* Return status */
return Status;