From 874478d7fd90e4178b95bc5a6f3b15c0c057c491 Mon Sep 17 00:00:00 2001 From: dfr Date: Tue, 31 May 2005 09:43:04 +0000 Subject: Add support for XMM registers in GDB for x86 processors that support SSE (or its successors). Reviewed by: marcel, davidxu MFC After: 2 weeks --- lib/libthread_db/arch/i386/libpthread_md.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/libthread_db/arch') diff --git a/lib/libthread_db/arch/i386/libpthread_md.c b/lib/libthread_db/arch/i386/libpthread_md.c index 86bb88d..dc14e60 100644 --- a/lib/libthread_db/arch/i386/libpthread_md.c +++ b/lib/libthread_db/arch/i386/libpthread_md.c @@ -81,6 +81,20 @@ pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) } void +pt_fxsave_to_ucontext(const char* r, ucontext_t *uc) +{ + if (has_xmm_regs) + memcpy(&uc->uc_mcontext.mc_fpstate, r, sizeof(struct savexmm)); +} + +void +pt_ucontext_to_fxsave(const ucontext_t *uc, char *r) +{ + if (has_xmm_regs) + memcpy(r, &uc->uc_mcontext.mc_fpstate, sizeof(struct savexmm)); +} + +void pt_md_init(void) { ucontext_t uc; -- cgit v1.1