excSimntLib.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* excLib.h - exception library header */
  2. /* Copyright 1984-1993 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01a,29apr98,cym  written based x86 version.
  7. */
  8. #ifndef __INCexcI86Libh
  9. #define __INCexcI86Libh
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #define LOW_VEC 0 /* lowest initialized vector */
  14. #define HIGH_VEC 0xff /* highest initialized vector */
  15. typedef struct
  16.     {
  17.     UINT16 valid; /* indicators that following fields are valid */
  18.     UINT16 vecNum; /* vector number */
  19.     ULONG errCode; /* error code */
  20.     INSTR *pc; /* program counter */
  21.     ULONG statusReg; /* status register */
  22.     UINT16 csReg; /* code segment register */
  23.     UINT16 pad; /* pad to four byte boundary */
  24.     } EXC_INFO;
  25. /* exception info valid bits */
  26. #define EXC_VEC_NUM 0x01 /* vector number valid */
  27. #define EXC_ERROR_CODE 0x02 /* error code valid */
  28. #define EXC_PC 0x04 /* pc valid */
  29. #define EXC_STATUS_REG 0x08 /* status register valid */
  30. #define EXC_CS_REG 0x10 /* code segment register valid */
  31. #define EXC_INVALID_TYPE 0x80 /* special indicator: ESF type was bad;
  32.  * type is in funcCode field */
  33. /* variable declarations */
  34. extern FUNCPTR  excExcepHook;   /* add'l rtn to call when exceptions occur */
  35. /* function declarations */
  36. #if defined(__STDC__) || defined(__cplusplus)
  37. extern void excStub (void);
  38. extern void excIntStub (void);
  39. #else /* __STDC__ */
  40. extern void excStub ();
  41. extern void excIntStub ();
  42. #endif /* __STDC__ */
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif /* __INCexcI86Libh */