1 /* 2 * Copyright 2005-2009, Haiku Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _ARCH_X86_DEBUGGER_H 6 #define _ARCH_X86_DEBUGGER_H 7 8 9 typedef struct x86_fp_register { 10 uint8 value[10]; 11 uint8 reserved[6]; 12 } x86_fp_register; 13 14 15 typedef struct x86_xmm_register { 16 uint8 value[16]; 17 } x86_xmm_register; 18 19 20 typedef struct x86_extended_registers { 21 uint16 control; 22 uint16 status; 23 uint8 tag; 24 uint8 reserved1; 25 uint16 opcode; 26 uint32 instruction_pointer; 27 uint16 cs; 28 uint16 reserved2; 29 uint32 data_pointer; 30 uint16 ds; 31 uint16 reserved3; 32 uint32 mxcsr; 33 uint32 mxcsr_mask; 34 union { 35 x86_fp_register fp_registers[8]; // st0-st7 36 x86_fp_register mmx_registers[8]; // mm0-mm7 37 }; 38 x86_xmm_register xmm_registers[8]; // xmm0-xmm7 39 uint8 reserved4[224]; // 288 - 512 40 } x86_extended_registers; 41 42 43 struct x86_debug_cpu_state { 44 x86_extended_registers extended_registers; 45 46 uint32 gs; 47 uint32 fs; 48 uint32 es; 49 uint32 ds; 50 uint32 edi; 51 uint32 esi; 52 uint32 ebp; 53 uint32 esp; 54 uint32 ebx; 55 uint32 edx; 56 uint32 ecx; 57 uint32 eax; 58 uint32 vector; 59 uint32 error_code; 60 uint32 eip; 61 uint32 cs; 62 uint32 eflags; 63 uint32 user_esp; 64 uint32 user_ss; 65 } __attribute__((aligned(16))); 66 67 68 #endif // _ARCH_X86_DEBUGGER_H 69