mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 05:58:13 +00:00
parent
51cb3cc6b2
commit
d32e96d602
3 changed files with 24 additions and 73 deletions
|
@ -39,8 +39,9 @@ extern ANSI_STRING KdpLogFileName;
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS *********************************************************/
|
/* PRIVATE FUNCTIONS *********************************************************/
|
||||||
|
|
||||||
static INIT_FUNCTION
|
INIT_FUNCTION
|
||||||
PCHAR
|
PCHAR
|
||||||
|
NTAPI
|
||||||
KdpGetDebugMode(PCHAR Currentp2)
|
KdpGetDebugMode(PCHAR Currentp2)
|
||||||
{
|
{
|
||||||
PCHAR p1, p2 = Currentp2;
|
PCHAR p1, p2 = Currentp2;
|
||||||
|
@ -134,8 +135,9 @@ KdpGetDebugMode(PCHAR Currentp2)
|
||||||
return p2;
|
return p2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static INIT_FUNCTION
|
INIT_FUNCTION
|
||||||
VOID
|
VOID
|
||||||
|
NTAPI
|
||||||
KdpCallInitRoutine(ULONG BootPhase)
|
KdpCallInitRoutine(ULONG BootPhase)
|
||||||
{
|
{
|
||||||
PLIST_ENTRY CurrentEntry;
|
PLIST_ENTRY CurrentEntry;
|
||||||
|
|
|
@ -423,12 +423,10 @@ KdpScreenAcquire(VOID)
|
||||||
InbvEnableDisplayString(TRUE);
|
InbvEnableDisplayString(TRUE);
|
||||||
InbvSetScrollRegion(0, 0, 639, 479);
|
InbvSetScrollRegion(0, 0, 639, 479);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
DbgPrint("********* -----> Could NOT acquire SCREEN!! <----- *********\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// extern VOID NTAPI InbvSetDisplayOwnership(IN BOOLEAN DisplayOwned);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
KdpScreenRelease(VOID)
|
KdpScreenRelease(VOID)
|
||||||
{
|
{
|
||||||
|
@ -436,6 +434,7 @@ KdpScreenRelease(VOID)
|
||||||
InbvCheckDisplayOwnership())
|
InbvCheckDisplayOwnership())
|
||||||
{
|
{
|
||||||
/* Release the display */
|
/* Release the display */
|
||||||
|
// InbvSetDisplayOwnership(FALSE);
|
||||||
InbvNotifyDisplayOwnershipLost(NULL);
|
InbvNotifyDisplayOwnershipLost(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -633,14 +632,6 @@ KdpPromptString(
|
||||||
USHORT i;
|
USHORT i;
|
||||||
ULONG DummyScanCode;
|
ULONG DummyScanCode;
|
||||||
|
|
||||||
/*************************/
|
|
||||||
/**/if (!(KdbDebugState & KD_DEBUG_KDSERIAL))/**/
|
|
||||||
KbdDisableMouse();
|
|
||||||
/* Take control of the display */
|
|
||||||
if (KdpDebugMode.Screen)
|
|
||||||
KdpScreenAcquire();
|
|
||||||
/*************************/
|
|
||||||
|
|
||||||
StringChar.Buffer = &Response;
|
StringChar.Buffer = &Response;
|
||||||
StringChar.Length = StringChar.MaximumLength = sizeof(Response);
|
StringChar.Length = StringChar.MaximumLength = sizeof(Response);
|
||||||
|
|
||||||
|
@ -657,8 +648,8 @@ KdpPromptString(
|
||||||
/* Acquire the printing spinlock without waiting at raised IRQL */
|
/* Acquire the printing spinlock without waiting at raised IRQL */
|
||||||
OldIrql = KdpAcquireLock(&KdpSerialSpinLock);
|
OldIrql = KdpAcquireLock(&KdpSerialSpinLock);
|
||||||
|
|
||||||
// if (!(KdbDebugState & KD_DEBUG_KDSERIAL))
|
if (!(KdbDebugState & KD_DEBUG_KDSERIAL))
|
||||||
// KbdDisableMouse();
|
KbdDisableMouse();
|
||||||
|
|
||||||
/* Loop the whole string */
|
/* Loop the whole string */
|
||||||
for (i = 0; i < ResponseString->MaximumLength; i++)
|
for (i = 0; i < ResponseString->MaximumLength; i++)
|
||||||
|
@ -720,8 +711,8 @@ KdpPromptString(
|
||||||
/* Return the length */
|
/* Return the length */
|
||||||
ResponseString->Length = i;
|
ResponseString->Length = i;
|
||||||
|
|
||||||
// if (!(KdbDebugState & KD_DEBUG_KDSERIAL))
|
if (!(KdbDebugState & KD_DEBUG_KDSERIAL))
|
||||||
// KbdEnableMouse();
|
KbdEnableMouse();
|
||||||
|
|
||||||
/* Release the spinlock */
|
/* Release the spinlock */
|
||||||
KdpReleaseLock(&KdpSerialSpinLock, OldIrql);
|
KdpReleaseLock(&KdpSerialSpinLock, OldIrql);
|
||||||
|
@ -730,14 +721,6 @@ KdpPromptString(
|
||||||
*StringChar.Buffer = '\n';
|
*StringChar.Buffer = '\n';
|
||||||
KdpPrintString(&StringChar);
|
KdpPrintString(&StringChar);
|
||||||
|
|
||||||
/*************************/
|
|
||||||
/* Release the display */
|
|
||||||
if (KdpDebugMode.Screen)
|
|
||||||
KdpScreenRelease();
|
|
||||||
/**/if (!(KdbDebugState & KD_DEBUG_KDSERIAL))/**/
|
|
||||||
KbdEnableMouse();
|
|
||||||
/*************************/
|
|
||||||
|
|
||||||
/* Success; we don't need to resend */
|
/* Success; we don't need to resend */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1216,11 +1216,11 @@ KdbpInternalEnter(VOID)
|
||||||
PVOID SavedInitialStack, SavedStackBase, SavedKernelStack;
|
PVOID SavedInitialStack, SavedStackBase, SavedKernelStack;
|
||||||
ULONG SavedStackLimit;
|
ULONG SavedStackLimit;
|
||||||
|
|
||||||
// KbdDisableMouse();
|
KbdDisableMouse();
|
||||||
|
|
||||||
// /* Take control of the display */
|
/* Take control of the display */
|
||||||
// if (KdpDebugMode.Screen)
|
if (KdpDebugMode.Screen)
|
||||||
// KdpScreenAcquire();
|
KdpScreenAcquire();
|
||||||
|
|
||||||
/* Call the interface's main loop on a different stack */
|
/* Call the interface's main loop on a different stack */
|
||||||
Thread = PsGetCurrentThread();
|
Thread = PsGetCurrentThread();
|
||||||
|
@ -1241,11 +1241,11 @@ KdbpInternalEnter(VOID)
|
||||||
Thread->Tcb.StackLimit = SavedStackLimit;
|
Thread->Tcb.StackLimit = SavedStackLimit;
|
||||||
Thread->Tcb.KernelStack = SavedKernelStack;
|
Thread->Tcb.KernelStack = SavedKernelStack;
|
||||||
|
|
||||||
// /* Release the display */
|
/* Release the display */
|
||||||
// if (KdpDebugMode.Screen)
|
if (KdpDebugMode.Screen)
|
||||||
// KdpScreenRelease();
|
KdpScreenRelease();
|
||||||
|
|
||||||
// KbdEnableMouse();
|
KbdEnableMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG
|
static ULONG
|
||||||
|
@ -1356,13 +1356,6 @@ KdbEnterDebuggerException(
|
||||||
EnterConditionMet = FALSE;
|
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 */
|
/* If we stopped on one of our breakpoints then let the user know */
|
||||||
KdbLastBreakPointNr = -1;
|
KdbLastBreakPointNr = -1;
|
||||||
KdbEnteredOnSingleStep = FALSE;
|
KdbEnteredOnSingleStep = FALSE;
|
||||||
|
@ -1538,9 +1531,7 @@ KdbEnterDebuggerException(
|
||||||
{
|
{
|
||||||
if (!EnterConditionMet)
|
if (!EnterConditionMet)
|
||||||
{
|
{
|
||||||
// return kdHandleException;
|
return kdHandleException;
|
||||||
ContinueType = kdHandleException;
|
|
||||||
goto cleanup_quit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KdbpPrint("\nEntered debugger on unexpected debug trap!\n");
|
KdbpPrint("\nEntered debugger on unexpected debug trap!\n");
|
||||||
|
@ -1555,9 +1546,7 @@ KdbEnterDebuggerException(
|
||||||
}
|
}
|
||||||
if (!EnterConditionMet)
|
if (!EnterConditionMet)
|
||||||
{
|
{
|
||||||
// return kdHandleException;
|
return kdHandleException;
|
||||||
ContinueType = kdHandleException;
|
|
||||||
goto cleanup_quit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KdbpPrint("\nEntered debugger on embedded INT3 at 0x%04x:0x%08x.\n",
|
KdbpPrint("\nEntered debugger on embedded INT3 at 0x%04x:0x%08x.\n",
|
||||||
|
@ -1571,8 +1560,7 @@ KdbEnterDebuggerException(
|
||||||
|
|
||||||
if (!EnterConditionMet)
|
if (!EnterConditionMet)
|
||||||
{
|
{
|
||||||
// return ContinueType;
|
return ContinueType;
|
||||||
goto cleanup_quit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KdbpPrint("\nEntered debugger on %s-chance exception (Exception Code: 0x%x) (%s)\n",
|
KdbpPrint("\nEntered debugger on %s-chance exception (Exception Code: 0x%x) (%s)\n",
|
||||||
|
@ -1628,9 +1616,7 @@ KdbEnterDebuggerException(
|
||||||
if (InterlockedIncrement(&KdbEntryCount) > 1)
|
if (InterlockedIncrement(&KdbEntryCount) > 1)
|
||||||
{
|
{
|
||||||
__writeeflags(OldEflags);
|
__writeeflags(OldEflags);
|
||||||
// return kdHandleException;
|
return kdHandleException;
|
||||||
ContinueType = kdHandleException;
|
|
||||||
goto cleanup_quit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the main loop */
|
/* Call the main loop */
|
||||||
|
@ -1683,14 +1669,6 @@ KdbEnterDebuggerException(
|
||||||
}
|
}
|
||||||
|
|
||||||
continue_execution:
|
continue_execution:
|
||||||
|
|
||||||
/*************************/
|
|
||||||
/* Release the display */
|
|
||||||
if (KdpDebugMode.Screen)
|
|
||||||
KdpScreenRelease();
|
|
||||||
KbdEnableMouse();
|
|
||||||
/*************************/
|
|
||||||
|
|
||||||
/* Clear debug status */
|
/* Clear debug status */
|
||||||
if (ExceptionCode == STATUS_BREAKPOINT) /* FIXME: Why clear DR6 on INT3? */
|
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;
|
return ContinueType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1732,8 +1699,7 @@ KdbpGetCommandLineSettings(
|
||||||
{
|
{
|
||||||
#define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]) - 1)
|
#define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]) - 1)
|
||||||
|
|
||||||
/* Loop through the switches */
|
while (p1 && (p1 = strchr(p1, ' ')))
|
||||||
for (; p1 && *p1; p1 = strchr(p1, ' '))
|
|
||||||
{
|
{
|
||||||
/* Skip other spaces */
|
/* Skip other spaces */
|
||||||
while (*p1 == ' ') ++p1;
|
while (*p1 == ' ') ++p1;
|
||||||
|
|
Loading…
Reference in a new issue