mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[NTOS:KD] Remove some _WINDK_ usages
- 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
This commit is contained in:
parent
f5e962ff2e
commit
f7ec84eea0
8 changed files with 31 additions and 33 deletions
|
@ -1792,10 +1792,8 @@ Phase1InitializationDiscard(IN PVOID Context)
|
|||
/* Update progress bar */
|
||||
InbvUpdateProgressBar(25);
|
||||
|
||||
#ifdef _WINKD_
|
||||
/* No KD Time Slip is pending */
|
||||
KdpTimeSlipPending = 0;
|
||||
#endif
|
||||
|
||||
/* Initialize in-place execution support */
|
||||
XIPInit(LoaderBlock);
|
||||
|
|
|
@ -189,16 +189,6 @@ KdpPrintString(
|
|||
_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);
|
||||
|
|
|
@ -61,11 +61,7 @@
|
|||
#include "po.h"
|
||||
#include "se.h"
|
||||
#include "ldr.h"
|
||||
#ifndef _WINKD_
|
||||
#include "kd.h"
|
||||
#else
|
||||
#include "kd64.h"
|
||||
#endif
|
||||
#include "fsrtl.h"
|
||||
#include "lpc.h"
|
||||
#include "rtl.h"
|
||||
|
|
|
@ -21,6 +21,8 @@ BOOLEAN KdPitchDebugger = TRUE;
|
|||
BOOLEAN KdIgnoreUmExceptions = FALSE;
|
||||
KD_CONTEXT KdpContext;
|
||||
ULONG Kd_WIN2000_Mask;
|
||||
LONG KdpTimeSlipPending;
|
||||
KDDEBUGGER_DATA64 KdDebuggerDataBlock;
|
||||
VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads);
|
||||
|
||||
typedef struct
|
||||
|
@ -29,7 +31,7 @@ typedef struct
|
|||
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;
|
||||
|
@ -204,7 +206,9 @@ KdpEnterDebuggerException(IN PKTRAP_FRAME TrapFrame,
|
|||
ExceptionInformation[2],
|
||||
OutString,
|
||||
OutStringLength,
|
||||
PreviousMode);
|
||||
PreviousMode,
|
||||
TrapFrame,
|
||||
ExceptionFrame);
|
||||
|
||||
/* Return the number of characters that we received */
|
||||
Context->Eax = ReturnValue;
|
||||
|
@ -264,6 +268,12 @@ KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord,
|
|||
|
||||
/* PUBLIC FUNCTIONS *********************************************************/
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KdUpdateDataBlock(VOID)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
@ -302,6 +312,13 @@ KdDisableDebugger(VOID)
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KdEnableDebuggerWithLock(IN BOOLEAN NeedLock)
|
||||
{
|
||||
return STATUS_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
@ -383,10 +400,10 @@ NtQueryDebugFilterState(IN ULONG ComponentId,
|
|||
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 */
|
||||
return (Level & KdComponentTable[i].Level) ? TRUE : FALSE;
|
||||
return (Level & KdpComponentTable[i].Level) ? TRUE : FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -423,7 +440,7 @@ NtSetDebugFilterState(IN ULONG ComponentId,
|
|||
/* Search for an existing entry */
|
||||
for (i = 0; i < KdComponentTableEntries; i++ )
|
||||
{
|
||||
if (ComponentId == KdComponentTable[i].ComponentId)
|
||||
if (ComponentId == KdpComponentTable[i].ComponentId)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -436,15 +453,15 @@ NtSetDebugFilterState(IN ULONG ComponentId,
|
|||
|
||||
/* 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)
|
||||
KdComponentTable[i].Level |= Level;
|
||||
KdpComponentTable[i].Level |= Level;
|
||||
else
|
||||
KdComponentTable[i].Level &= ~Level;
|
||||
KdpComponentTable[i].Level &= ~Level;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#include "internal/kd.h"
|
||||
|
||||
/* DEFINES *******************************************************************/
|
||||
|
||||
|
|
|
@ -3672,14 +3672,16 @@ KdpSerialDebugPrint(
|
|||
STRING KdpPromptString = RTL_CONSTANT_STRING("kdb:> ");
|
||||
extern KSPIN_LOCK KdpSerialSpinLock;
|
||||
|
||||
ULONG
|
||||
USHORT
|
||||
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;
|
||||
|
|
|
@ -1062,9 +1062,7 @@ KeBugCheckWithTf(IN ULONG BugCheckCode,
|
|||
}
|
||||
|
||||
/* Check if we need to save the context for KD */
|
||||
#ifdef _WINKD_
|
||||
if (!KdPitchDebugger) KdDebuggerDataBlock.SavedContext = (ULONG_PTR)&Context;
|
||||
#endif
|
||||
|
||||
/* Check if a debugger is connected */
|
||||
if ((BugCheckCode != MANUALLY_INITIATED_CRASH) && (KdDebuggerEnabled))
|
||||
|
@ -1147,9 +1145,7 @@ KeBugCheckWithTf(IN ULONG BugCheckCode,
|
|||
if (!(KdDebuggerEnabled) && !(KdPitchDebugger))
|
||||
{
|
||||
/* Enable it */
|
||||
#ifdef _WINKD_
|
||||
KdEnableDebuggerWithLock(FALSE);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -383,10 +383,8 @@ PspInitializeSystemDll(VOID)
|
|||
KeBugCheckEx(PROCESS1_INITIALIZATION_FAILED, Status, 8, 0, 0);
|
||||
}
|
||||
|
||||
#ifdef _WINKD_
|
||||
/* Let KD know we are done */
|
||||
KdUpdateDataBlock();
|
||||
#endif
|
||||
|
||||
/* Return status */
|
||||
return Status;
|
||||
|
|
Loading…
Reference in a new issue