haiku/headers/private/kernel/arch/x86/64/iframe.h
Alex Smith bcb07a319b Implemented the rest of the kernel debugger functions for x86_64.
Merged with the x86 implementations, mostly the same except for a
few differences. GDB stub is currently broken, will investigate
later.
2012-07-13 14:09:09 +01:00

48 lines
769 B
C

/*
* Copyright 2012, Alex Smith, alex@alex-smith.me.uk.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_X86_64_IFRAME_H
#define _KERNEL_ARCH_X86_64_IFRAME_H
struct iframe {
uint64 type;
uint64 r15;
uint64 r14;
uint64 r13;
uint64 r12;
uint64 r11;
uint64 r10;
uint64 r9;
uint64 r8;
uint64 bp;
uint64 si;
uint64 di;
uint64 dx;
uint64 cx;
uint64 bx;
uint64 ax;
uint64 vector;
uint64 error_code;
uint64 ip;
uint64 cs;
uint64 flags;
// SP and SS are unconditionally present on x86_64, make both names
// available.
union {
uint64 sp;
uint64 user_sp;
};
union {
uint64 ss;
uint64 user_ss;
};
} _PACKED;
#define IFRAME_IS_USER(f) (((f)->cs & DPL_USER) == DPL_USER)
#endif /* _KERNEL_ARCH_X86_64_IFRAME_H */