This was not meant to be committed!

This reverts commit 5e14dbd648.
This commit is contained in:
Hermès Bélusca-Maïto 2019-12-26 17:19:11 +01:00
parent 51cb3cc6b2
commit d32e96d602
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 24 additions and 73 deletions

View file

@ -39,8 +39,9 @@ extern ANSI_STRING KdpLogFileName;
/* PRIVATE FUNCTIONS *********************************************************/
static INIT_FUNCTION
INIT_FUNCTION
PCHAR
NTAPI
KdpGetDebugMode(PCHAR Currentp2)
{
PCHAR p1, p2 = Currentp2;
@ -134,8 +135,9 @@ KdpGetDebugMode(PCHAR Currentp2)
return p2;
}
static INIT_FUNCTION
INIT_FUNCTION
VOID
NTAPI
KdpCallInitRoutine(ULONG BootPhase)
{
PLIST_ENTRY CurrentEntry;

View file

@ -423,12 +423,10 @@ KdpScreenAcquire(VOID)
InbvEnableDisplayString(TRUE);
InbvSetScrollRegion(0, 0, 639, 479);
}
else
{
DbgPrint("********* -----> Could NOT acquire SCREEN!! <----- *********\n");
}
}
// extern VOID NTAPI InbvSetDisplayOwnership(IN BOOLEAN DisplayOwned);
VOID
KdpScreenRelease(VOID)
{
@ -436,6 +434,7 @@ KdpScreenRelease(VOID)
InbvCheckDisplayOwnership())
{
/* Release the display */
// InbvSetDisplayOwnership(FALSE);
InbvNotifyDisplayOwnershipLost(NULL);
}
}
@ -633,14 +632,6 @@ KdpPromptString(
USHORT i;
ULONG DummyScanCode;
/*************************/
/**/if (!(KdbDebugState & KD_DEBUG_KDSERIAL))/**/
KbdDisableMouse();
/* Take control of the display */
if (KdpDebugMode.Screen)
KdpScreenAcquire();
/*************************/
StringChar.Buffer = &Response;
StringChar.Length = StringChar.MaximumLength = sizeof(Response);
@ -657,8 +648,8 @@ KdpPromptString(
/* Acquire the printing spinlock without waiting at raised IRQL */
OldIrql = KdpAcquireLock(&KdpSerialSpinLock);
// if (!(KdbDebugState & KD_DEBUG_KDSERIAL))
// KbdDisableMouse();
if (!(KdbDebugState & KD_DEBUG_KDSERIAL))
KbdDisableMouse();
/* Loop the whole string */
for (i = 0; i < ResponseString->MaximumLength; i++)
@ -720,8 +711,8 @@ KdpPromptString(
/* Return the length */
ResponseString->Length = i;
// if (!(KdbDebugState & KD_DEBUG_KDSERIAL))
// KbdEnableMouse();
if (!(KdbDebugState & KD_DEBUG_KDSERIAL))
KbdEnableMouse();
/* Release the spinlock */
KdpReleaseLock(&KdpSerialSpinLock, OldIrql);
@ -730,14 +721,6 @@ KdpPromptString(
*StringChar.Buffer = '\n';
KdpPrintString(&StringChar);
/*************************/
/* Release the display */
if (KdpDebugMode.Screen)
KdpScreenRelease();
/**/if (!(KdbDebugState & KD_DEBUG_KDSERIAL))/**/
KbdEnableMouse();
/*************************/
/* Success; we don't need to resend */
return FALSE;
}

View file

@ -1216,11 +1216,11 @@ KdbpInternalEnter(VOID)
PVOID SavedInitialStack, SavedStackBase, SavedKernelStack;
ULONG SavedStackLimit;
// KbdDisableMouse();
KbdDisableMouse();
// /* Take control of the display */
// if (KdpDebugMode.Screen)
// KdpScreenAcquire();
/* Take control of the display */
if (KdpDebugMode.Screen)
KdpScreenAcquire();
/* Call the interface's main loop on a different stack */
Thread = PsGetCurrentThread();
@ -1241,11 +1241,11 @@ KdbpInternalEnter(VOID)
Thread->Tcb.StackLimit = SavedStackLimit;
Thread->Tcb.KernelStack = SavedKernelStack;
// /* Release the display */
// if (KdpDebugMode.Screen)
// KdpScreenRelease();
/* Release the display */
if (KdpDebugMode.Screen)
KdpScreenRelease();
// KbdEnableMouse();
KbdEnableMouse();
}
static ULONG
@ -1356,13 +1356,6 @@ KdbEnterDebuggerException(
EnterConditionMet = FALSE;
}
/*************************/
KbdDisableMouse();
/* Take control of the display */
if (KdpDebugMode.Screen)
KdpScreenAcquire();
/*************************/
/* If we stopped on one of our breakpoints then let the user know */
KdbLastBreakPointNr = -1;
KdbEnteredOnSingleStep = FALSE;
@ -1538,9 +1531,7 @@ KdbEnterDebuggerException(
{
if (!EnterConditionMet)
{
// return kdHandleException;
ContinueType = kdHandleException;
goto cleanup_quit;
return kdHandleException;
}
KdbpPrint("\nEntered debugger on unexpected debug trap!\n");
@ -1555,9 +1546,7 @@ KdbEnterDebuggerException(
}
if (!EnterConditionMet)
{
// return kdHandleException;
ContinueType = kdHandleException;
goto cleanup_quit;
return kdHandleException;
}
KdbpPrint("\nEntered debugger on embedded INT3 at 0x%04x:0x%08x.\n",
@ -1571,8 +1560,7 @@ KdbEnterDebuggerException(
if (!EnterConditionMet)
{
// return ContinueType;
goto cleanup_quit;
return ContinueType;
}
KdbpPrint("\nEntered debugger on %s-chance exception (Exception Code: 0x%x) (%s)\n",
@ -1628,9 +1616,7 @@ KdbEnterDebuggerException(
if (InterlockedIncrement(&KdbEntryCount) > 1)
{
__writeeflags(OldEflags);
// return kdHandleException;
ContinueType = kdHandleException;
goto cleanup_quit;
return kdHandleException;
}
/* Call the main loop */
@ -1683,14 +1669,6 @@ KdbEnterDebuggerException(
}
continue_execution:
/*************************/
/* Release the display */
if (KdpDebugMode.Screen)
KdpScreenRelease();
KbdEnableMouse();
/*************************/
/* Clear debug status */
if (ExceptionCode == STATUS_BREAKPOINT) /* FIXME: Why clear DR6 on INT3? */
{
@ -1710,17 +1688,6 @@ continue_execution:
}
}
return ContinueType;
cleanup_quit:
/*************************/
/* Release the display */
if (KdpDebugMode.Screen)
KdpScreenRelease();
KbdEnableMouse();
/*************************/
return ContinueType;
}
@ -1732,8 +1699,7 @@ KdbpGetCommandLineSettings(
{
#define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]) - 1)
/* Loop through the switches */
for (; p1 && *p1; p1 = strchr(p1, ' '))
while (p1 && (p1 = strchr(p1, ' ')))
{
/* Skip other spaces */
while (*p1 == ' ') ++p1;