https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4dc0e5cc81ef3db911b96ec0fa42d0a30f7274e8

commit 4dc0e5cc81ef3db911b96ec0fa42d0a30f7274e8
Author:     Hervé Poussineau <hpous...@reactos.org>
AuthorDate: Sun Sep 22 21:41:46 2024 +0200
Commit:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
CommitDate: Tue Jan 28 22:00:50 2025 +0100

    [NTOS:EX] Implement NtSystemDebugControl: 
SysDbgGetAutoKdEnable/SysDbgSetAutoKdEnable
---
 ntoskrnl/ex/dbgctrl.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/ntoskrnl/ex/dbgctrl.c b/ntoskrnl/ex/dbgctrl.c
index 048cc0c53e5..1948164397f 100644
--- a/ntoskrnl/ex/dbgctrl.c
+++ b/ntoskrnl/ex/dbgctrl.c
@@ -291,7 +291,33 @@ NtSystemDebugControl(
                 break;
 
             case SysDbgGetAutoKdEnable:
+                if (OutputBufferLength != sizeof(BOOLEAN))
+                {
+                    Status = STATUS_INFO_LENGTH_MISMATCH;
+                }
+                else
+                {
+                    *(PBOOLEAN)OutputBuffer = KdAutoEnableOnEvent;
+                    Status = STATUS_SUCCESS;
+                }
+                break;
+
             case SysDbgSetAutoKdEnable:
+                if (InputBufferLength != sizeof(BOOLEAN))
+                {
+                    Status = STATUS_INFO_LENGTH_MISMATCH;
+                }
+                else if (KdPitchDebugger)
+                {
+                    Status = STATUS_ACCESS_DENIED;
+                }
+                else
+                {
+                    KdAutoEnableOnEvent = *(PBOOLEAN)InputBuffer;
+                    Status = STATUS_SUCCESS;
+                }
+                break;
+
             case SysDbgGetPrintBufferSize:
             case SysDbgSetPrintBufferSize:
             case SysDbgGetKdUmExceptionEnable:

Reply via email to