Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
4.0 KiB

  1. //
  2. // This is a temp file that defines to be defined data structures - WINNT.H
  3. //
  4. #define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386 | 0x00000020L) // cpu specific extensions
  5. #define MAXIMUM_SUPPORTED_EXTENSION 512
  6. //
  7. // Context Frame
  8. //
  9. // This frame has a several purposes: 1) it is used as an argument to
  10. // NtContinue, 2) is is used to constuct a call frame for APC delivery,
  11. // and 3) it is used in the user level thread creation routines.
  12. //
  13. // The layout of the record conforms to a standard call frame.
  14. //
  15. typedef struct _TEMP_CONTEXT {
  16. //
  17. // The flags values within this flag control the contents of
  18. // a CONTEXT record.
  19. //
  20. // If the context record is used as an input parameter, then
  21. // for each portion of the context record controlled by a flag
  22. // whose value is set, it is assumed that that portion of the
  23. // context record contains valid context. If the context record
  24. // is being used to modify a threads context, then only that
  25. // portion of the threads context will be modified.
  26. //
  27. // If the context record is used as an IN OUT parameter to capture
  28. // the context of a thread, then only those portions of the thread's
  29. // context corresponding to set flags will be returned.
  30. //
  31. // The context record is never used as an OUT only parameter.
  32. //
  33. DWORD ContextFlags;
  34. //
  35. // This section is specified/returned if CONTEXT_DEBUG_REGISTERS is
  36. // set in ContextFlags. Note that CONTEXT_DEBUG_REGISTERS is NOT
  37. // included in CONTEXT_FULL.
  38. //
  39. DWORD Dr0;
  40. DWORD Dr1;
  41. DWORD Dr2;
  42. DWORD Dr3;
  43. DWORD Dr6;
  44. DWORD Dr7;
  45. //
  46. // This section is specified/returned if the
  47. // ContextFlags word contians the flag CONTEXT_FLOATING_POINT.
  48. //
  49. FLOATING_SAVE_AREA FloatSave;
  50. //
  51. // This section is specified/returned if the
  52. // ContextFlags word contians the flag CONTEXT_SEGMENTS.
  53. //
  54. DWORD SegGs;
  55. DWORD SegFs;
  56. DWORD SegEs;
  57. DWORD SegDs;
  58. //
  59. // This section is specified/returned if the
  60. // ContextFlags word contians the flag CONTEXT_INTEGER.
  61. //
  62. DWORD Edi;
  63. DWORD Esi;
  64. DWORD Ebx;
  65. DWORD Edx;
  66. DWORD Ecx;
  67. DWORD Eax;
  68. //
  69. // This section is specified/returned if the
  70. // ContextFlags word contians the flag CONTEXT_CONTROL.
  71. //
  72. DWORD Ebp;
  73. DWORD Eip;
  74. DWORD SegCs; // MUST BE SANITIZED
  75. DWORD EFlags; // MUST BE SANITIZED
  76. DWORD Esp;
  77. DWORD SegSs;
  78. //
  79. // This section is specified/returned if the ContextFlags word
  80. // contains the flag CONTEXT_EXTENDED_REGISTERS.
  81. // The format and contexts are processor specific
  82. //
  83. BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
  84. } TEMP_CONTEXT, *PTEMP_CONTEXT;
  85. typedef struct _TEMP_EXCEPTION_POINTERS {
  86. PEXCEPTION_RECORD ExceptionRecord;
  87. PTEMP_CONTEXT ContextRecord;
  88. } TEMP_EXCEPTION_POINTERS, *PTEMP_EXCEPTION_POINTERS;
  89. #define SIZE_OF_X87_REGISTERS 128
  90. #define SIZE_OF_XMMI_REGISTERS 128
  91. #define SIZE_OF_FX_REGISTERS 128
  92. #define NUMBER_OF_REGISTERS 8
  93. typedef struct _FLOATING_EXTENDED_SAVE_AREA {
  94. USHORT ControlWord;
  95. USHORT StatusWord;
  96. USHORT TagWord;
  97. USHORT ErrorOpcode;
  98. ULONG ErrorOffset;
  99. ULONG ErrorSelector;
  100. ULONG DataOffset;
  101. ULONG DataSelector;
  102. ULONG MXCsr;
  103. ULONG Reserved2;
  104. UCHAR X87RegisterArea[SIZE_OF_FX_REGISTERS];
  105. UCHAR XMMIRegisterArea[SIZE_OF_FX_REGISTERS];
  106. UCHAR Reserved4[224];
  107. } FLOATING_EXTENDED_SAVE_AREA, *PFLOATING_EXTENDED_SAVE_AREA;
  108. typedef struct _MMX_AREA {
  109. MMX64 Mmx;
  110. _U64 Reserved;
  111. } MMX_AREA, *PMMX_AREA;
  112. typedef struct _X87_AREA {
  113. MMX_AREA Mm[NUMBER_OF_REGISTERS];
  114. } X87_AREA, *PX87_AREA;
  115. typedef struct _XMMI_AREA {
  116. XMMI128 Xmmi[NUMBER_OF_REGISTERS];
  117. } XMMI_AREA, *PXMMI_AREA;