projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a typo.
[reactos.git]
/
reactos
/
ntoskrnl
/
kdbg
/
kdb.c
diff --git
a/reactos/ntoskrnl/kdbg/kdb.c
b/reactos/ntoskrnl/kdbg/kdb.c
index
67037f6
..
91660cf
100644
(file)
--- a/
reactos/ntoskrnl/kdbg/kdb.c
+++ b/
reactos/ntoskrnl/kdbg/kdb.c
@@
-127,12
+127,6
@@
KiEspToTrapFrame(
IN PKTRAP_FRAME TrapFrame,
IN ULONG Esp);
IN PKTRAP_FRAME TrapFrame,
IN ULONG Esp);
-/* ROS Internal. Please deprecate */
-NTHALAPI
-VOID
-NTAPI
-HalReleaseDisplayOwnership();
-
/* FUNCTIONS *****************************************************************/
static VOID
/* FUNCTIONS *****************************************************************/
static VOID
@@
-1247,9
+1241,21
@@
KdbpInternalEnter()
ULONG SavedStackLimit;
KbdDisableMouse();
ULONG SavedStackLimit;
KbdDisableMouse();
- if (KdpDebugMode.Screen)
+
+ if (KdpDebugMode.Screen &&
+ InbvIsBootDriverInstalled() &&
+ !InbvCheckDisplayOwnership())
{
{
+ /* Acquire ownership and reset the display */
InbvAcquireDisplayOwnership();
InbvAcquireDisplayOwnership();
+ InbvResetDisplay();
+
+ /* Display debugger prompt */
+ InbvSolidColorFill(0, 0, 639, 479, 0);
+ InbvSetTextColor(15);
+ InbvInstallDisplayStringFilter(NULL);
+ InbvEnableDisplayString(TRUE);
+ InbvSetScrollRegion(0, 0, 639, 479);
}
/* Call the interface's main loop on a different stack */
}
/* Call the interface's main loop on a different stack */
@@
-1466,12
+1472,12
@@
KdbEnterDebuggerException(
if (BreakPoint->Type == KdbBreakPointSoftware)
{
if (BreakPoint->Type == KdbBreakPointSoftware)
{
- KdbpPrint("Entered debugger on breakpoint #%d: EXEC 0x%04x:0x%08x\n",
+ KdbpPrint("
\n
Entered debugger on breakpoint #%d: EXEC 0x%04x:0x%08x\n",
KdbLastBreakPointNr, TrapFrame->SegCs & 0xffff, TrapFrame->Eip);
}
else if (BreakPoint->Type == KdbBreakPointHardware)
{
KdbLastBreakPointNr, TrapFrame->SegCs & 0xffff, TrapFrame->Eip);
}
else if (BreakPoint->Type == KdbBreakPointHardware)
{
- KdbpPrint("Entered debugger on breakpoint #%d: %s 0x%08x\n",
+ KdbpPrint("
\n
Entered debugger on breakpoint #%d: %s 0x%08x\n",
KdbLastBreakPointNr,
(BreakPoint->Data.Hw.AccessType == KdbAccessRead) ? "READ" :
((BreakPoint->Data.Hw.AccessType == KdbAccessWrite) ? "WRITE" :
KdbLastBreakPointNr,
(BreakPoint->Data.Hw.AccessType == KdbAccessRead) ? "READ" :
((BreakPoint->Data.Hw.AccessType == KdbAccessWrite) ? "WRITE" :
@@
-1539,7
+1545,7
@@
KdbEnterDebuggerException(
return kdHandleException;
}
return kdHandleException;
}
- KdbpPrint("Entered debugger on unexpected debug trap!\n");
+ KdbpPrint("
\n
Entered debugger on unexpected debug trap!\n");
}
}
else if (ExceptionCode == STATUS_BREAKPOINT)
}
}
else if (ExceptionCode == STATUS_BREAKPOINT)
@@
-1554,7
+1560,7
@@
KdbEnterDebuggerException(
return kdHandleException;
}
return kdHandleException;
}
- KdbpPrint("Entered debugger on embedded INT3 at 0x%04x:0x%08x.\n",
+ KdbpPrint("
\n
Entered debugger on embedded INT3 at 0x%04x:0x%08x.\n",
TrapFrame->SegCs & 0xffff, TrapFrame->Eip - 1);
}
else
TrapFrame->SegCs & 0xffff, TrapFrame->Eip - 1);
}
else
@@
-1568,7
+1574,7
@@
KdbEnterDebuggerException(
return ContinueType;
}
return ContinueType;
}
- KdbpPrint("Entered debugger on %s-chance exception (Exception Code: 0x%x) (%s)\n",
+ KdbpPrint("
\n
Entered debugger on %s-chance exception (Exception Code: 0x%x) (%s)\n",
FirstChance ? "first" : "last", ExceptionCode, ExceptionString);
if (ExceptionCode == STATUS_ACCESS_VIOLATION &&
FirstChance ? "first" : "last", ExceptionCode, ExceptionString);
if (ExceptionCode == STATUS_ACCESS_VIOLATION &&
@@
-1656,7
+1662,7
@@
KdbEnterDebuggerException(
/* Decrement the entry count */
InterlockedDecrement(&KdbEntryCount);
/* Decrement the entry count */
InterlockedDecrement(&KdbEntryCount);
- /* HACK: Raise back to old IR
W
L */
+ /* HACK: Raise back to old IR
Q
L */
KeRaiseIrql(OldIrql, &OldIrql);
/* Leave critical section */
KeRaiseIrql(OldIrql, &OldIrql);
/* Leave critical section */
@@
-1699,30
+1705,29
@@
INIT_FUNCTION
KdbpGetCommandLineSettings(
PCHAR p1)
{
KdbpGetCommandLineSettings(
PCHAR p1)
{
- PCHAR p2;
+#define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]) - 1)
- while (p1 && (p
2
= strchr(p1, ' ')))
+ while (p1 && (p
1
= strchr(p1, ' ')))
{
{
- p2 += 2;
+ /* Skip other spaces */
+ while (*p1 == ' ') ++p1;
- if (!_strnicmp(p
2, "KDSERIAL", 8
))
+ if (!_strnicmp(p
1, "KDSERIAL", CONST_STR_LEN("KDSERIAL")
))
{
{
- p
2 += 8
;
+ p
1 += CONST_STR_LEN("KDSERIAL")
;
KdbDebugState |= KD_DEBUG_KDSERIAL;
KdpDebugMode.Serial = TRUE;
}
KdbDebugState |= KD_DEBUG_KDSERIAL;
KdpDebugMode.Serial = TRUE;
}
- else if (!_strnicmp(p
2, "KDNOECHO", 8
))
+ else if (!_strnicmp(p
1, "KDNOECHO", CONST_STR_LEN("KDNOECHO")
))
{
{
- p
2 += 8
;
+ p
1 += CONST_STR_LEN("KDNOECHO")
;
KdbDebugState |= KD_DEBUG_KDNOECHO;
}
KdbDebugState |= KD_DEBUG_KDNOECHO;
}
- else if (!_strnicmp(p
2, "FIRSTCHANCE", 11
))
+ else if (!_strnicmp(p
1, "FIRSTCHANCE", CONST_STR_LEN("FIRSTCHANCE")
))
{
{
- p
2 += 11
;
+ p
1 += CONST_STR_LEN("FIRSTCHANCE")
;
KdbpSetEnterCondition(-1, TRUE, KdbEnterAlways);
}
KdbpSetEnterCondition(-1, TRUE, KdbEnterAlways);
}
-
- p1 = p2;
}
}
}
}