[NTOS:KD:KDBG] Integration into KD framework (Part 2/3)

Add redirections for KdSave/KdRestore and KdD0Transition/KdD3Transition.

Both KDBG and KD(TERM) need those since they will become external
transport DLLs later.
This commit is contained in:
Hermès Bélusca-Maïto 2023-03-21 18:42:29 +01:00
parent 2046a17ef4
commit 0d0ffb7d7d
No known key found for this signature in database
GPG Key ID: 3B2539C65E7B93D0
3 changed files with 85 additions and 0 deletions

View File

@ -91,6 +91,10 @@
#include <kddll.h>
#ifdef KDBG
/* Define new names for these exports also present in KDBG */
#define KdD0Transition KdbgD0Transition
#define KdD3Transition KdbgD3Transition
#define KdSave KdbgSave
#define KdRestore KdbgRestore
#define KdSendPacket KdbgSendPacket
#define KdReceivePacket KdbgReceivePacket
/* And reload the definitions with these new names */

View File

@ -14,6 +14,11 @@
#define NDEBUG
#include <debug.h>
#undef KdD0Transition
#undef KdD3Transition
#undef KdSave
#undef KdRestore
/* PUBLIC FUNCTIONS *********************************************************/
static VOID
@ -446,4 +451,38 @@ KdDebuggerInitialize1(
return STATUS_SUCCESS;
}
NTSTATUS
NTAPI
KdD0Transition(VOID)
{
/* Nothing to do */
return STATUS_SUCCESS;
}
NTSTATUS
NTAPI
KdD3Transition(VOID)
{
/* Nothing to do */
return STATUS_SUCCESS;
}
NTSTATUS
NTAPI
KdSave(
_In_ BOOLEAN SleepTransition)
{
/* Nothing to do */
return STATUS_SUCCESS;
}
NTSTATUS
NTAPI
KdRestore(
_In_ BOOLEAN SleepTransition)
{
/* Nothing to do */
return STATUS_SUCCESS;
}
/* EOF */

View File

@ -22,6 +22,48 @@ static NTSTATUS KdbgContinueStatus = STATUS_SUCCESS;
/* FUNCTIONS *****************************************************************/
NTSTATUS
NTAPI
KdD0Transition(VOID)
#undef KdD0Transition
#define pKdD0Transition KdD0Transition
{
/* Call KdTerm */
return pKdD0Transition();
}
NTSTATUS
NTAPI
KdD3Transition(VOID)
#undef KdD3Transition
#define pKdD3Transition KdD3Transition
{
/* Call KdTerm */
return pKdD3Transition();
}
NTSTATUS
NTAPI
KdSave(
_In_ BOOLEAN SleepTransition)
#undef KdSave
#define pKdSave KdSave
{
/* Call KdTerm */
return pKdSave(SleepTransition);
}
NTSTATUS
NTAPI
KdRestore(
_In_ BOOLEAN SleepTransition)
#undef KdRestore
#define pKdRestore KdRestore
{
/* Call KdTerm */
return pKdRestore(SleepTransition);
}
VOID
NTAPI
KdSendPacket(