[ros-diffs] [fireball] 33943: - Prevent a misunderstanding: kdHandleException means the debugger did NOT handle the exception. Fix the logic, and thus fix vectored exception handling which led to 2nd stage hang in qemu. - TODO: This ContinueType thing should be reworked into a better logic. See issue #3344 for more details.

fireball at svn.reactos.org fireball at svn.reactos.org
Thu Jun 12 10:56:13 CEST 2008


Author: fireball
Date: Thu Jun 12 03:56:13 2008
New Revision: 33943

URL: http://svn.reactos.org/svn/reactos?rev=33943&view=rev
Log:
- Prevent a misunderstanding: kdHandleException means the debugger did NOT handle the exception. Fix the logic, and thus fix vectored exception handling which led to 2nd stage hang in qemu.
- TODO: This ContinueType thing should be reworked into a better logic.
See issue #3344 for more details.

Modified:
    trunk/reactos/ntoskrnl/kd/kdmain.c
    trunk/reactos/ntoskrnl/kdbg/kdb.c

Modified: trunk/reactos/ntoskrnl/kd/kdmain.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=33943&r1=33942&r2=33943&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] Thu Jun 12 03:56:13 2008
@@ -165,8 +165,10 @@
         //DPRINT1("Address: %p. Return: %d\n", EipOld, Return);
     }
 
-    /* Convert return to BOOLEAN */
-    if (Return == kdDoNotHandleException) return FALSE;
+    /* Debugger didn't handle it, please handle! */
+    if (Return == kdHandleException) return FALSE;
+
+    /* Debugger handled it */
     return TRUE;
 }
 
@@ -194,8 +196,10 @@
                                                   TrapFrame);
     }
 
-    /* Convert return to BOOLEAN */
-    if (Return == kdDoNotHandleException) return FALSE;
+    /* Debugger didn't handle it, please handle! */
+    if (Return == kdHandleException) return FALSE;
+
+    /* Debugger handled it */
     return TRUE;
 }
 

Modified: trunk/reactos/ntoskrnl/kdbg/kdb.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb.c?rev=33943&r1=33942&r2=33943&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] Thu Jun 12 03:56:13 2008
@@ -1479,7 +1479,7 @@
       {
          if (!EnterConditionMet)
          {
-            return kdDoNotHandleException;
+            return kdHandleException;
          }
          DbgPrint("Entered debugger on unexpected debug trap!\n");
       }
@@ -1493,7 +1493,7 @@
       }
       if (!EnterConditionMet)
       {
-         return kdDoNotHandleException;
+         return kdHandleException;
       }
 
       DbgPrint("Entered debugger on embedded INT3 at 0x%04x:0x%08x.\n",



More information about the Ros-diffs mailing list