Yuriy Sidorov <jura@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.

svn path=/trunk/; revision=34521
This commit is contained in:
Aleksey Bragin 2008-07-15 13:32:18 +00:00
parent f8f3b78fce
commit 39f888f2b3

View file

@ -41,8 +41,8 @@ RtlRaiseException(PEXCEPTION_RECORD ExceptionRecord)
/* 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 @@ RtlRaiseStatus(NTSTATUS Status)
/* 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);