/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Kernel
- * FILE: ntoskrnl/kd/kdinit.c
+ * FILE: ntoskrnl/kd/kdmain.c
* PURPOSE: Kernel Debugger Initialization
*
* PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
typedef struct
{
- ULONG ComponentId;
- ULONG Level;
+ ULONG ComponentId;
+ ULONG Level;
} KD_COMPONENT_DATA;
#define MAX_KD_COMPONENT_TABLE_ENTRIES 128
KD_COMPONENT_DATA KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES];
break;
}
+#if defined(_M_IX86) && !defined(_WINKD_) // See ke/i386/traphdlr.c
/* Register a debug callback */
case 'CsoR':
{
}
break;
}
+#endif
/* Special case for stack frame dumps */
case 'DsoR':
break;
}
-#if KDBG
+#if defined(KDBG)
/* Register KDBG CLI callback */
case 'RbdK':
{
#endif /* DBG */
default:
DPRINT1("Invalid debug service call!\n");
- HalDisplayString("Invalid debug service call!\n");
+ HalDisplayString("Invalid debug service call!\r\n");
break;
}
(USHORT)ExceptionRecord->
ExceptionInformation[2],
OutString,
- OutStringLength);
+ OutStringLength,
+ PreviousMode);
/* Return the number of characters that we received */
Context->Eax = ReturnValue;
/* Check if this is an assertion failure */
if (ExceptionRecord->ExceptionCode == STATUS_ASSERTION_FAILURE)
{
- /* Warn about it */
- DbgPrint("\n!!! Assertion Failure at Address 0x%p !!!\n\n",
- (PVOID)Context->Eip);
-
- /* Bump EIP to the instruction following the int 2C and return */
+ /* Bump EIP to the instruction following the int 2C */
Context->Eip += 2;
- return TRUE;
}
#endif
/* Disable the Debugger */
KdDebuggerEnabled = FALSE;
+ SharedUserData->KdDebuggerEnabled = FALSE;
/* Lower the IRQL */
KeLowerIrql(OldIrql);
/* Enable the Debugger */
KdDebuggerEnabled = TRUE;
+ SharedUserData->KdDebuggerEnabled = TRUE;
/* Lower the IRQL */
KeLowerIrql(OldIrql);
Level = 1 << Level;
/* Check if it is not the default component */
- if (ComponentId != DPFLTR_DEFAULT_ID)
+ if (ComponentId != MAXULONG)
{
/* No, search for an existing entry in the table */
for (i = 0; i < KdComponentTableEntries; i++)
Level &= ~DPFLTR_MASK;
/* Check if it is the default component */
- if (ComponentId == DPFLTR_DEFAULT_ID)
+ if (ComponentId == MAXULONG)
{
/* Yes, modify the default mask */
if (State)