[NTOS:KD] Rename KdpEnterDebuggerException to KdpTrap + add KdpStub forwarder

This removes somes uses of _WINKD_ macro.
This commit is contained in:
Hervé Poussineau 2020-03-07 18:54:21 +01:00
parent 4d84c856ad
commit d0e2fada23
3 changed files with 18 additions and 10 deletions

View file

@ -158,7 +158,7 @@ KdpServiceDispatcher(ULONG Service,
BOOLEAN
NTAPI
KdpEnterDebuggerException(IN PKTRAP_FRAME TrapFrame,
KdpTrap(IN PKTRAP_FRAME TrapFrame,
IN PKEXCEPTION_FRAME ExceptionFrame,
IN PEXCEPTION_RECORD ExceptionRecord,
IN PCONTEXT Context,
@ -292,6 +292,23 @@ KdpEnterDebuggerException(IN PKTRAP_FRAME TrapFrame,
return TRUE;
}
BOOLEAN
NTAPI
KdpStub(IN PKTRAP_FRAME TrapFrame,
IN PKEXCEPTION_FRAME ExceptionFrame,
IN PEXCEPTION_RECORD ExceptionRecord,
IN PCONTEXT ContextRecord,
IN KPROCESSOR_MODE PreviousMode,
IN BOOLEAN SecondChanceException)
{
return KdpTrap(TrapFrame,
ExceptionFrame,
ExceptionRecord,
ContextRecord,
PreviousMode,
SecondChanceException);
}
BOOLEAN
NTAPI
KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord,
@ -414,9 +431,6 @@ KdSystemDebugControl(IN SYSDBG_COMMAND Command,
PreviousMode);
}
PKDEBUG_ROUTINE KiDebugRoutine = KdpEnterDebuggerException;
CODE_SEG("INIT")
PCHAR
NTAPI
KdpGetDebugMode(PCHAR Currentp2)

View file

@ -71,9 +71,7 @@ BOOLEAN KdpContextSent;
//
// Debug Trap Handlers
//
#ifdef _WINKD_
PKDEBUG_ROUTINE KiDebugRoutine = KdpStub;
#endif
PKDEBUG_SWITCH_ROUTINE KiDebugSwitchRoutine;
//

View file

@ -171,10 +171,8 @@ KdInitSystem(IN ULONG BootPhase,
/* Check if we already initialized once */
if (KdDebuggerEnabled) return TRUE;
#ifdef _WINKD_
/* Set the Debug Routine as the Stub for now */
KiDebugRoutine = KdpStub;
#endif
/* Disable break after symbol load for now */
KdBreakAfterSymbolLoad = FALSE;
@ -368,10 +366,8 @@ KdInitSystem(IN ULONG BootPhase,
/* Initialize the debugger if requested */
if (EnableKd && (NT_SUCCESS(KdDebuggerInitialize0(LoaderBlock))))
{
#ifdef _WINKD_
/* Now set our real KD routine */
KiDebugRoutine = KdpTrap;
#endif
/* Check if we've already initialized our structures */
if (!KdpDebuggerStructuresInitialized)