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

📄 exception.h

📁 小型操作系统,以VC为开发环境,需要boachs调试
💻 H
字号:
/***************************************************************************
**     File name   : exception.h
**     Author      : x.cheng
**     Create date :
**
**	  Comments:
**		exception...
**	
**     Revisions:
**     $Log: exception.h,v $
**     Revision 1.1  2005/08/05 15:07:03  x.cheng
**     add into repositories
**
**
***************************************************************************/
#ifndef __EXCEPTION_H__
#define __EXCEPTION_H__

//! Context after an exception.
typedef struct ExceptionContext_Struct
{
	// General purpose register.
	unsigned long ulEdi, ulEsi, ulEbp, ulEbx, ulEdx, ulEcx, ulEax;
	
	unsigned long ulEs, ulDs;	// Segment register.
	
	unsigned long ulExcNb, ulErrorCode;	// The exception number and error code.

	unsigned long ulEip;		// Current instruction pointer (k.a. program counter).
	
	unsigned long ulCs;			// Code segment register.
	
	unsigned long ulEflags;		// EFLAGS register.

} __attribute__ ((packed)) ts_ExceptionContext;

//! Context after an exception.
typedef struct ExceptionUserContext_Struct
{
	// General purpose register.
	unsigned long ulEdi, ulEsi, ulEbp, ulEbx, ulEdx, ulEcx, ulEax;
	
	unsigned long ulEs, ulDs;	// Segment register.
	
	unsigned long ulExcNb, ulErrorCode;	// The exception number and error code.

	unsigned long ulEip;		// Current instruction pointer (k.a. program counter).
	
	unsigned long ulCs;			// Code segment register.
	
	unsigned long ulEflags;		// EFLAGS register.

	unsigned long ulUserEsp;	// User stack pointer register.
	
	unsigned long ulUserSs;		// User stack segment register.

} __attribute__ ((packed)) ts_ExceptionUserContext;


void DefaultExceptionHandler(ts_ExceptionContext* pstContext);

#endif /* end of  __EXCEPTION_H__ */

⌨️ 快捷键说明

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