Skip to content

Commit 4dc0e5c

Browse files
hpoussinHBelusca
authored andcommitted
[NTOS:EX] Implement NtSystemDebugControl: SysDbgGetAutoKdEnable/SysDbgSetAutoKdEnable
1 parent 4bae44e commit 4dc0e5c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

ntoskrnl/ex/dbgctrl.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,33 @@ NtSystemDebugControl(
291291
break;
292292

293293
case SysDbgGetAutoKdEnable:
294+
if (OutputBufferLength != sizeof(BOOLEAN))
295+
{
296+
Status = STATUS_INFO_LENGTH_MISMATCH;
297+
}
298+
else
299+
{
300+
*(PBOOLEAN)OutputBuffer = KdAutoEnableOnEvent;
301+
Status = STATUS_SUCCESS;
302+
}
303+
break;
304+
294305
case SysDbgSetAutoKdEnable:
306+
if (InputBufferLength != sizeof(BOOLEAN))
307+
{
308+
Status = STATUS_INFO_LENGTH_MISMATCH;
309+
}
310+
else if (KdPitchDebugger)
311+
{
312+
Status = STATUS_ACCESS_DENIED;
313+
}
314+
else
315+
{
316+
KdAutoEnableOnEvent = *(PBOOLEAN)InputBuffer;
317+
Status = STATUS_SUCCESS;
318+
}
319+
break;
320+
295321
case SysDbgGetPrintBufferSize:
296322
case SysDbgSetPrintBufferSize:
297323
case SysDbgGetKdUmExceptionEnable:

0 commit comments

Comments
 (0)