if (FirstChance)
{
/* Make sure a debugger is present, and ignore user-mode if requested */
if ((KiDebugRoutine) &&
(!(PsGetCurrentProcess()->DebugPort)))
{
/* Call the debugger */
if (KiDebugRoutine(TrapFrame,
ExceptionFrame,
ExceptionRecord,
&Context,
PreviousMode,
FALSE))
{
/* Exception was handled */
goto Handled;
}
}
/* Forward exception to user mode debugger */
if (DbgkForwardException(ExceptionRecord, TRUE, FALSE)) goto Exit;
这儿先是判断 if ((KiDebugRoutine) &&
(!(PsGetCurrentProcess()->DebugPort)))
就是说DebugPort不为零的话,那么调用KiDebugRoutine,
{
/* Make sure a debugger is present, and ignore user-mode if requested */
if ((KiDebugRoutine) &&
(!(PsGetCurrentProcess()->DebugPort)))
{
/* Call the debugger */
if (KiDebugRoutine(TrapFrame,
ExceptionFrame,
ExceptionRecord,
&Context,
PreviousMode,
FALSE))
{
/* Exception was handled */
goto Handled;
}
}
/* Forward exception to user mode debugger */
if (DbgkForwardException(ExceptionRecord, TRUE, FALSE)) goto Exit;
这儿先是判断 if ((KiDebugRoutine) &&
(!(PsGetCurrentProcess()->DebugPort)))
就是说DebugPort不为零的话,那么调用KiDebugRoutine,