📄 dblflt.c
字号:
/****************************************************************************** * * PROJECT: pICE * $Source: /cvsroot/pice/pice/module/dblflt.c,v $ * $Revision: 1.5 $ * $Date: 2004/02/17 23:07:36 $ * $Author: lightweave $ * $Name: $ * * $Log: dblflt.c,v $ * Revision 1.5 2004/02/17 23:07:36 lightweave * * Improved the DEBUG facillity and replaced the configuration handler with a * new code which now can read MS Windows INI style files. See CHANGES.txt for * more details. * Also added a macro which prevents compiling for kernels before 2.4.19. * * Revision 1.4 2003/06/18 22:00:22 lightweave * DEBUG and DEBUG_SERIAL added * * *****************************************************************************/static char *ident = "$Header: /cvsroot/pice/pice/module/dblflt.c,v 1.5 2004/02/17 23:07:36 lightweave Exp $";/*++Copyright (c) 1998-2001 Klaus P. GerlicherModule Name: dblflt.cAbstract: handle double faults on x86Environment: LINUX 2.2.X Kernel mode onlyAuthor: Klaus P. GerlicherRevision History: 13-Nov-1999: created 15-Nov-2000: general cleanup of source filesCopyright notice: This file may be distributed under the terms of the GNU Public License.--*/////////////////////////////////////////////////////// INCLUDES////#include "remods.h"#include <asm/delay.h>#include "precomp.h"////////////////////////////////////////////////////// DEFINES////#define DOUBLE_FAULT_VECTOR (0x08)////////////////////////////////////////////////////// GLOBALS////ULONG OldDblFltHandler = 0;////////////////////////////////////////////////////// FUNCTIONS//////************************************************************************* // HandleDoubleFault() // //************************************************************************* void HandleDoubleFault(EXCEPTION_FRAME *ptr){ DPRINT(PICE_DEBUG, DBT_BP, DBL_INFO, "HandleDoubleFault(): ptr = %8p [EMPTY FUNCTION]\n", ptr);}//************************************************************************* // InstallDblFltHook() // //************************************************************************* void InstallDblFltHook(void){#ifdef ACTIVATE_DOUBLEFAULT_HOOK void DebuggerDoubleFault(void); ENTER_FUNC(); if(!OldDblFltHandler) { HookInterruptVector(DOUBLE_FAULT_VECTOR,(PVOID)&DebuggerDoubleFault,(PVOID)&OldDblFltHandler); } LEAVE_FUNC();#endif // ACTIVATE_DOUBLEFAULT_HOOK }//************************************************************************* // DeInstallDblFltHook() // //************************************************************************* void DeInstallDblFltHook(void){#ifdef ACTIVATE_DOUBLEFAULT_HOOK ENTER_FUNC(); if(OldDblFltHandler) { HookInterruptVector(DOUBLE_FAULT_VECTOR,(PVOID)OldDblFltHandler,NULL); } LEAVE_FUNC();#endif // ACTIVATE_DOUBLEFAULT_HOOK }// EOF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -