Author: ion
Date: Sat Mar 3 22:49:36 2007
New Revision: 25976
URL:
http://svn.reactos.org/svn/reactos?rev=25976&view=rev
Log:
- Fix another typo in CommonDispatchException (with yet another critical flaw as a
result). Sometimes, exceptions would incorrectly be detected as coming from user-mode even
though CS was kernel mode. When creating the KTRAP_FRAME, the kernel would then add the
Ring 3 RPL_MASK (3) (because it believed we're in usermode) to the kernel-mode CS,
creating the invalid CS of 0xB, which would lead into a GPF during the iretd.
- Re-enable DebugPrint since this now works.
Modified:
trunk/reactos/lib/rtl/debug.c
trunk/reactos/ntoskrnl/kd/kdmain.c
trunk/reactos/ntoskrnl/ke/i386/trap.s
Modified: trunk/reactos/lib/rtl/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=25976&…
==============================================================================
--- trunk/reactos/lib/rtl/debug.c (original)
+++ trunk/reactos/lib/rtl/debug.c Sat Mar 3 22:49:36 2007
@@ -23,7 +23,6 @@
IN ULONG Level)
{
/* Call the INT2D Service */
- return STATUS_SUCCESS;
return DebugService(BREAKPOINT_PRINT,
DebugString->Buffer,
DebugString->Length,
Modified: trunk/reactos/ntoskrnl/kd/kdmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/kd/kdmain.c (original)
+++ trunk/reactos/ntoskrnl/kd/kdmain.c Sat Mar 3 22:49:36 2007
@@ -127,6 +127,7 @@
/* This we can handle: simply bump EIP */
Context->Eip++;
+ return TRUE;
}
/* Get out of here if the Debugger isn't connected */
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/trap.s (original)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s Sat Mar 3 22:49:36 2007
@@ -604,7 +604,7 @@
/* Set the record in ECX and check if this was V86 */
mov ecx, esp
- test dword ptr [esp+KTRAP_FRAME_EFLAGS], EFLAGS_V86_MASK
+ test dword ptr [ebp+KTRAP_FRAME_EFLAGS], EFLAGS_V86_MASK
jz SetPreviousMode
/* Set V86 mode */
@@ -791,6 +791,7 @@
sti
PrepInt3:
+
/* Prepare the exception */
mov esi, ecx
mov edi, edx