Author: fireball
Date: Tue Jul 15 08:32:18 2008
New Revision: 34521
URL:
http://svn.reactos.org/svn/reactos?rev=34521&view=rev
Log:
Yuriy Sidorov <jura(a)cp-lab.com>
- Speed-up user mode exception handling by calling RtlDispatchException() first if there
is no active user mode debugger. This avoids switches to kernel mode if exception can be
handled by SEH.
See issue #3485 for more details.
Modified:
trunk/reactos/lib/rtl/exception.c
Modified: trunk/reactos/lib/rtl/exception.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/exception.c?rev=34…
==============================================================================
--- trunk/reactos/lib/rtl/exception.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/exception.c [iso-8859-1] Tue Jul 15 08:32:18 2008
@@ -41,8 +41,8 @@
/* Write the context flag */
Context.ContextFlags = CONTEXT_FULL;
- /* Check mode */
- if (RtlpGetMode() == UserMode)
+ /* Check if user mode debugger is active */
+ if (RtlpCheckForActiveDebugger(FALSE))
{
/* Raise an exception immediately */
Status = ZwRaiseException(ExceptionRecord, &Context, TRUE);
@@ -94,8 +94,8 @@
/* Write the context flag */
Context.ContextFlags = CONTEXT_FULL;
- /* Check mode */
- if (RtlpGetMode() == UserMode)
+ /* Check if user mode debugger is active */
+ if (RtlpCheckForActiveDebugger(FALSE))
{
/* Raise an exception immediately */
ZwRaiseException(&ExceptionRecord, &Context, TRUE);