home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / glibc-1.06 / sysdeps / mach / hurd / i386 / sigcontext.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-01  |  2.6 KB  |  80 lines

  1. /* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3.  
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8.  
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. Library General Public License for more details.
  13.  
  14. You should have received a copy of the GNU Library General Public
  15. License along with the GNU C Library; see the file COPYING.LIB.  If
  16. not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  17. Cambridge, MA 02139, USA.  */
  18.  
  19. /* Signal handlers are actually called:
  20.    void handler (int sig, int code, struct sigcontext *scp);  */
  21.  
  22. /* State of this thread when the signal was taken.  */
  23. struct sigcontext
  24. {
  25.   int sc_onstack;        /* Nonzero if running on sigstack.  */
  26.   sigset_t sc_mask;        /* Blocked signals to restore.  */
  27.  
  28.   /* Port this thread is doing an interruptible RPC on.  */
  29.   unsigned long int sc_intr_port;
  30.   
  31.   /* Segment registers (not used).  */
  32.   int sc_gs;
  33.   int sc_fs;
  34.   int sc_es;
  35.   int sc_ds;
  36.   int sc_ss;
  37.   
  38.   /* "General" registers.  */
  39.   int sc_edi;
  40.   int sc_esi;
  41.   int sc_ebp;
  42.   int sc_esp;            /* not used */
  43.   int sc_ebx;
  44.   int sc_edx;
  45.   int sc_ecx;
  46.   int sc_eax;
  47.   
  48.   int sc_trapno;        /* not used */
  49.   int sc_err;            /* not used */
  50.   
  51.   int sc_eip;            /* instruction pointer */
  52.    
  53.   int sc_cs;            /* not used */
  54.   
  55.   int sc_efl;            /* flags */
  56.   int sc_uesp;            /* THIS stack pointer is used */
  57. };
  58.  
  59.  
  60. /* Codes for SIGFPE.  */
  61. #define FPE_INTOVF_TRAP        0x1 /* integer overflow */
  62. #define FPE_INTDIV_FAULT    0x2 /* integer divide by zero */
  63. #define FPE_FLTOVF_FAULT    0x3 /* floating overflow */
  64. #define FPE_FLTDIV_FAULT    0x4 /* floating divide by zero */
  65. #define FPE_FLTUND_FAULT    0x5 /* floating underflow */
  66. #define FPE_SUBRNG_FAULT    0x7 /* BOUNDS instruction failed */
  67. #define FPE_FLTDNR_FAULT    0x8 /* denormalized operand */
  68. #define FPE_FLTINX_FAULT    0x9 /* floating loss of precision */
  69. #define FPE_EMERR_FAULT        0xa /* mysterious emulation error 33 */
  70. #define FPE_EMBND_FAULT        0xb /* emulation BOUNDS instruction failed */
  71.  
  72. /* Codes for SIGILL.  */
  73. #define ILL_INVOPR_FAULT    0x1 /* invalid operation */
  74. #define ILL_STACK_FAULT        0x2 /* fault on microkernel stack access */
  75. #define ILL_FPEOPR_FAULT    0x3 /* invalid floating operation */
  76.  
  77. /* Codes for SIGTRAP.  */
  78. #define DBG_SINGLE_TRAP        0x1 /* single step */
  79. #define DBG_BRKPNT_FAULT    0x2 /* breakpoint instruction */
  80.