⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bp.h

📁 一个类似与Windows环境下的softice的源代码
💻 H
字号:
/****************************************************************************** * * Copyright (c) 2003 Gerhard W. Gruber * * PROJECT: pICE * $Source: /cvsroot/pice/pice/module/bp.h,v $ * $Revision: 1.5 $ * $Date: 2004/02/17 23:07:36 $ * $Author: lightweave $ * $Name:  $ * * $Log: bp.h,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:21  lightweave * DEBUG and DEBUG_SERIAL added * * *****************************************************************************//*++Copyright (c) 1998-2001 Klaus P. GerlicherModule Name:    bp.hAbstract:    HEADER for bp.cEnvironment:    LINUX 2.2.X    Kernel mode onlyAuthor:     Klaus P. GerlicherRevision History:    15-Nov-2000:    general cleanup of source filesCopyright notice:  This file may be distributed under the terms of the GNU Public License.--*/#ifndef _BP_H#define _BP_Htypedef struct _SW_BP{    ULONG	bUsed				: 1;		// this slot is used    ULONG	bInstalled			: 1;		// the breakpoint described by this slot is installed    ULONG	bPermanent			: 1;		// it's not a user breakpoint    ULONG	bVirtual			: 1;		// the location is currently not in memory	ULONG   ucOriginalOpcode	: 8;		// the original byte at breakpoint    ULONG	ulAddress;						// address     ULONG	ulPhysAddress;					// physical address     ULONG	ulNextInstr;					// address after original instruction	ULONG	ulProcess;						// process for breakpoint    void	(*Callback)(EXCEPTION_FRAME*);	// callback for permanent breakpoint    char	szModName[64];					// module name for virtual kernel-mode breakpoints    char	szFunctionName[64];			// function name for virtual kernel-mode breakpoints    char	szProcessName[64];				// process name for virtual user-mode breakpoints}SW_BP,*PSW_BP;BOOLEAN InstallSWBreakpoint(ULONG ulAddress,BOOLEAN bPermanent,void (*SWBreakpointCallback)(EXCEPTION_FRAME*));BOOLEAN InstallVirtualSWBreakpoint(LPSTR ModName,LPSTR Function);void TryToInstallVirtualSWBreakpoints(void);BOOLEAN DeInstallSWBreakpoint(ULONG ulAddress);BOOLEAN RemoveSWBreakpoint(ULONG ulAddress);BOOLEAN NeedToReInstallSWBreakpoints(ULONG ulAddress,BOOLEAN bUseAddress);BOOLEAN ReInstallSWBreakpoint(ULONG ulAddress);BOOLEAN ReInstallSWBreakpointAtPreviousAddress(ULONG ulAddress);BOOLEAN RemoveAllSWBreakpoints(BOOLEAN bEvenPermanents);BOOLEAN RemoveSWBreakpointOnProcessExit(ULONG ulProcess);BOOLEAN RemoveSWBreakpointByNumber(ULONG ulNumber);PSW_BP IsPermanentSWBreakpoint(ULONG ulAddress);void ListSWBreakpoints(void);PSW_BP FindSwBp(ULONG ulAddress);BOOLEAN IsSwBpAtAddress(ULONG ulAddress);BOOLEAN IsSwBpAtAddressInstalled(ULONG ulAddress);BOOLEAN IsSwBpAtPreviousAddress(ULONG ulAddress);void RevirtualizeBreakpointsForModule(struct module* pMod);BOOLEAN PageSwapInReInstallSWBreakpoints(ULONG ulAddress);void ReInstallSWBreakpointsInPage(ULONG ulAddress);void InstallBreakpointHook(void);void DeInstallBreakpointHook(void);ULONG HandleHardwareBreakPoint(EXCEPTION_FRAME* pFrame);ULONG HandleSoftwareBreakPoint(EXCEPTION_FRAME* pFrame);#endif //_BP_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -