From 372eb0c0b8e09af0fa646c7e9245f49b65f05c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 28 Nov 2022 00:43:22 +0100 Subject: [PATCH] [NTOS:KDBG] Remove dead code. Addendum to baa47fa5e and fe777bb52. --- ntoskrnl/kdbg/kdb.c | 32 -------------------------------- ntoskrnl/kdbg/kdb.h | 4 ---- 2 files changed, 36 deletions(-) diff --git a/ntoskrnl/kdbg/kdb.c b/ntoskrnl/kdbg/kdb.c index abe8f96b2cd..1b03f692ec5 100644 --- a/ntoskrnl/kdbg/kdb.c +++ b/ntoskrnl/kdbg/kdb.c @@ -1623,38 +1623,6 @@ continue_execution: return ContinueType; } -KD_CONTINUE_TYPE -KdbEnterDebuggerFirstChanceException( - IN OUT PKTRAP_FRAME TrapFrame) -{ - EXCEPTION_RECORD64 ExceptionRecord; - KD_CONTINUE_TYPE Return; - CONTEXT Context; - - /* Copy TrapFrame to Context */ - RtlZeroMemory(&Context, sizeof(CONTEXT)); - Context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS; -#ifdef CONTEXT_EXTENDED_REGISTERS - Context.ContextFlags |= CONTEXT_EXTENDED_REGISTERS; -#endif - KeTrapFrameToContext(TrapFrame, NULL, &Context); - - /* Create ExceptionRecord (assume breakpoint) */ - RtlZeroMemory(&ExceptionRecord, sizeof(EXCEPTION_RECORD64)); - ExceptionRecord.ExceptionCode = STATUS_BREAKPOINT; - - /* Call real function */ - Return = KdbEnterDebuggerException(&ExceptionRecord, - KernelMode, - &Context, - TRUE); - - /* Copy back Context to TrapFrame */ - KeContextToTrapFrame(&Context, NULL, TrapFrame, Context.ContextFlags, KernelMode); - - return Return; -} - VOID NTAPI KdbpGetCommandLineSettings( diff --git a/ntoskrnl/kdbg/kdb.h b/ntoskrnl/kdbg/kdb.h index 4424dd4837c..b606d4a5156 100644 --- a/ntoskrnl/kdbg/kdb.h +++ b/ntoskrnl/kdbg/kdb.h @@ -257,10 +257,6 @@ KdbEnterDebuggerException(IN PEXCEPTION_RECORD64 ExceptionRecord, IN OUT PCONTEXT Context, IN BOOLEAN FirstChance); -KD_CONTINUE_TYPE -KdbEnterDebuggerFirstChanceException( - IN OUT PKTRAP_FRAME TrapFrame); - /* other functions */ NTSTATUS