为什么DebugPort清零,windbg就收不到这个进程的调试信息了。转的。

来源:互联网 发布:破解版电视软件 编辑:程序博客网 时间:2024/05/17 00:35
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,
原创粉丝点击