Skip to content

Commit d454675

Browse files
hpoussinHBelusca
authored andcommitted
[NTOS:EX] Implement NtSystemDebugControl: SysDbgGetKdUmExceptionEnable/SysDbgSetKdUmExceptionEnable
1 parent 734a043 commit d454675

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

ntoskrnl/ex/dbgctrl.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,40 @@ NtSystemDebugControl(
332332
break;
333333

334334
case SysDbgSetPrintBufferSize:
335+
UNIMPLEMENTED;
336+
Status = STATUS_NOT_IMPLEMENTED;
337+
break;
338+
335339
case SysDbgGetKdUmExceptionEnable:
340+
if (OutputBufferLength != sizeof(BOOLEAN))
341+
{
342+
Status = STATUS_INFO_LENGTH_MISMATCH;
343+
}
344+
else
345+
{
346+
/* Unfortunately, the internal flag says if UM exceptions are disabled */
347+
*(PBOOLEAN)OutputBuffer = !KdIgnoreUmExceptions;
348+
Status = STATUS_SUCCESS;
349+
}
350+
break;
351+
336352
case SysDbgSetKdUmExceptionEnable:
353+
if (InputBufferLength != sizeof(BOOLEAN))
354+
{
355+
Status = STATUS_INFO_LENGTH_MISMATCH;
356+
}
357+
else if (KdPitchDebugger)
358+
{
359+
Status = STATUS_ACCESS_DENIED;
360+
}
361+
else
362+
{
363+
/* Unfortunately, the internal flag says if UM exceptions are disabled */
364+
KdIgnoreUmExceptions = !*(PBOOLEAN)InputBuffer;
365+
Status = STATUS_SUCCESS;
366+
}
367+
break;
368+
337369
case SysDbgGetTriageDump:
338370
case SysDbgGetKdBlockEnable:
339371
case SysDbgSetKdBlockEnable:

0 commit comments

Comments
 (0)