Print this page
9736 kmdb tortures via single-step miscellaneous trap
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

*** 27,36 **** --- 27,38 ---- */ #ifndef _AMD64_SYS_KDI_REGS_H #define _AMD64_SYS_KDI_REGS_H + #include <sys/stddef.h> + #ifdef __cplusplus extern "C" { #endif /*
*** 75,84 **** --- 77,133 ---- #define KDIREG_PC KDIREG_RIP #define KDIREG_SP KDIREG_RSP #define KDIREG_FP KDIREG_RBP + #if !defined(_ASM) + + /* + * Handy for debugging krs_gregs; keep in sync with the KDIREG_* above. + */ + typedef struct { + greg_t kr_savfp; + greg_t kr_savpc; + greg_t kr_rdi; + greg_t kr_rsi; + greg_t kr_rdx; + greg_t kr_rcx; + greg_t kr_r8; + greg_t kr_r9; + greg_t kr_rax; + greg_t kr_rbx; + greg_t kr_rbp; + greg_t r_r10; + greg_t r_r11; + greg_t r_r12; + greg_t r_r13; + greg_t r_r14; + greg_t r_r15; + greg_t kr_fsbase; + greg_t kr_gsbase; + greg_t kr_kgsbase; + greg_t kr_cr2; + greg_t kr_cr3; + greg_t kr_ds; + greg_t kr_es; + greg_t kr_fs; + greg_t kr_gs; + greg_t kr_trapno; + greg_t kr_err; + greg_t kr_rip; + greg_t kr_cs; + greg_t kr_rflags; + greg_t kr_rsp; + greg_t kr_ss; + } kdiregs_t; + + #if defined(_KERNEL) + CTASSERT(offsetof(kdiregs_t, kr_ss) == ((KDIREG_NGREG - 1) * sizeof (greg_t))); + #endif + + #endif /* !_ASM */ + #ifdef __cplusplus } #endif #endif /* _AMD64_SYS_KDI_REGS_H */