** WIP ** [NTOS:KD64] Add/Refine debugger-disabled tests

This commit is contained in:
Hermès Bélusca-Maïto 2024-12-10 21:59:43 +01:00
parent e4f4f2a3cc
commit 47a72e430b
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -1991,6 +1991,10 @@ KdEnableDebuggerWithLock(IN BOOLEAN NeedLock)
KdDbgPortPrintf("%s\n", __FUNCTION__);
/* Fail if there is no debugger */
if (KdPitchDebugger)
return STATUS_DEBUGGER_INACTIVE;
/* Check if enabling the debugger is blocked */
if (KdBlockEnable)
{
@ -2065,10 +2069,11 @@ KdDisableDebuggerWithLock(IN BOOLEAN NeedLock)
KdDbgPortPrintf("%s\n", __FUNCTION__);
/*
* If enabling the debugger is blocked
* then there is nothing to disable (duh)
*/
/* Fail if there is no debugger */
if (KdPitchDebugger)
return STATUS_DEBUGGER_INACTIVE;
/* If enabling the debugger is blocked, then there is nothing to disable */
if (KdBlockEnable)
{
/* Fail */
@ -2594,10 +2599,7 @@ KdChangeOption(IN KD_OPTION Option,
{
/* Fail if there is no debugger */
if (KdPitchDebugger)
{
/* No debugger, no options */
return STATUS_DEBUGGER_INACTIVE;
}
/* Do we recognize this option? */
if (Option != KD_OPTION_SET_BLOCK_ENABLE)
@ -2674,12 +2676,9 @@ KdRefreshDebuggerNotPresent(VOID)
{
BOOLEAN Enable, DebuggerNotPresent;
/* Check if the debugger is completely disabled */
if (KdPitchDebugger)
{
/* Don't try to refresh then, fail early */
return TRUE;
}
/* Fail if there is no debugger, or if it is currently disabled */
if (KdPitchDebugger || !KdDebuggerEnabled)
return TRUE; // (KdDebuggerNotPresent = TRUE);
/* Enter the debugger */
Enable = KdEnterDebugger(NULL, NULL);