1 /* 2 * Copyright 2005-2012, Haiku Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _ARCH_X86_64_DEBUGGER_H 6 #define _ARCH_X86_64_DEBUGGER_H 7 8 9 typedef struct x86_64_fp_register { 10 uint8 value[10]; 11 uint8 reserved[6]; 12 } x86_64_fp_register; 13 14 15 typedef struct x86_64_xmm_register { 16 uint8 value[16]; 17 } x86_64_xmm_register; 18 19 20 typedef struct x86_64_extended_registers { 21 uint16 control; 22 uint16 status; 23 uint8 tag; 24 uint8 reserved1; 25 uint16 opcode; 26 uint64 instruction_pointer; 27 uint64 data_pointer; 28 uint32 mxcsr; 29 uint32 mxcsr_mask; 30 union { 31 x86_64_fp_register fp_registers[8]; // st0-st7 32 x86_64_fp_register mmx_registers[8]; // mm0-mm7 33 }; 34 x86_64_xmm_register xmm_registers[16]; // xmm0-xmm15 35 uint8 reserved2[96]; // 416 - 512 36 } x86_64_extended_registers; 37 38 39 struct x86_64_debug_cpu_state { 40 x86_64_extended_registers extended_registers; 41 42 uint64 gs; 43 uint64 fs; 44 uint64 es; 45 uint64 ds; 46 uint64 r15; 47 uint64 r14; 48 uint64 r13; 49 uint64 r12; 50 uint64 r11; 51 uint64 r10; 52 uint64 r9; 53 uint64 r8; 54 uint64 rbp; 55 uint64 rsi; 56 uint64 rdi; 57 uint64 rdx; 58 uint64 rcx; 59 uint64 rbx; 60 uint64 rax; 61 uint64 vector; 62 uint64 error_code; 63 uint64 rip; 64 uint64 cs; 65 uint64 rflags; 66 uint64 rsp; 67 uint64 ss; 68 } __attribute__((aligned(16))); 69 70 71 #endif // _ARCH_X86_64_DEBUGGER_H 72