sighndh.inc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2000 by Jonas Maebe,
  4. member of the Free Pascal development team.
  5. Sigcontext and Sigaction
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {$packrecords C}
  13. type
  14. tfpreg = record
  15. significand: array[0..3] of word;
  16. exponent: word;
  17. end;
  18. tfpxreg = record
  19. significand: array[0..3] of word;
  20. exponent: word;
  21. padding : array[0..2] of word;
  22. end;
  23. txmmreg = record
  24. element : array[0..3] of dword;
  25. end;
  26. tfpx_sw_bytes = record
  27. magic1 : dword;
  28. extended_size : dword;
  29. xfeatures : qword;
  30. xstate_size : dword;
  31. padding : array[0..6] of dword;
  32. end;
  33. pfpstate = ^tfpstate;
  34. tfpstate = record
  35. cw, sw, tag, ipoff, cssel, dataoff, datasel: cardinal;
  36. st: array[0..7] of tfpreg;
  37. status, magic: word;
  38. fxsr_env : array[0..5] of dword;
  39. mxcsr : dword;
  40. reserved : dword;
  41. fxsr_st : array[0..7] of tfpxreg;
  42. xmmreg : array[0..7] of txmmreg;
  43. case byte of
  44. 1: (padding : array[0..43] of dword;
  45. case byte of
  46. 1: (padding2 : array[0..11] of dword);
  47. 2: (sw_reserved : tfpx_sw_bytes);
  48. );
  49. 2: (padding1 : array[0..43] of dword);
  50. end;
  51. PSigContext = ^TSigContext;
  52. TSigContext = record
  53. gs, __gsh: word;
  54. fs, __fsh: word;
  55. es, __esh: word;
  56. ds, __dsh: word;
  57. edi: cardinal;
  58. esi: cardinal;
  59. ebp: cardinal;
  60. esp: cardinal;
  61. ebx: cardinal;
  62. edx: cardinal;
  63. ecx: cardinal;
  64. eax: cardinal;
  65. trapno: cardinal;
  66. err: cardinal;
  67. eip: cardinal;
  68. cs, __csh: word;
  69. eflags: cardinal;
  70. esp_at_signal: cardinal;
  71. ss, __ssh: word;
  72. fpstate: pfpstate;
  73. oldmask: cardinal;
  74. cr2: cardinal;
  75. end;
  76. tsigaltstack=record
  77. ss_sp : pointer;
  78. ss_flags : longint;
  79. ss_size : longint;
  80. end;
  81. Pucontext=^Tucontext;
  82. TUcontext=record
  83. uc_flags : cardinal;
  84. uc_link : Pucontext;
  85. uc_stack : tsigaltstack;
  86. uc_mcontext : tsigcontext;
  87. uc_sigmask : tsigset;
  88. end;