Date: Sat, 6 Aug 2011 17:49:21 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r224684 - head/lib/libthread_db/arch/amd64 Message-ID: <201108061749.p76HnLPq061321@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Sat Aug 6 17:49:21 2011 New Revision: 224684 URL: http://svn.freebsd.org/changeset/base/224684 Log: Use the size of struct fpreg rather than of the pointer to it when copying the FPU state. Reviewed by: marcel Approved by: re (kib) MFC after: 1 week Modified: head/lib/libthread_db/arch/amd64/libpthread_md.c Modified: head/lib/libthread_db/arch/amd64/libpthread_md.c ============================================================================== --- head/lib/libthread_db/arch/amd64/libpthread_md.c Sat Aug 6 17:48:30 2011 (r224683) +++ head/lib/libthread_db/arch/amd64/libpthread_md.c Sat Aug 6 17:49:21 2011 (r224684) @@ -92,18 +92,21 @@ pt_ucontext_to_reg(const ucontext_t *uc, void pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc) { - memcpy(&uc->uc_mcontext.mc_fpstate, r, sizeof(r)); + + memcpy(&uc->uc_mcontext.mc_fpstate, r, sizeof(*r)); } void pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) { - memcpy(r, &uc->uc_mcontext.mc_fpstate, sizeof(r)); + + memcpy(r, &uc->uc_mcontext.mc_fpstate, sizeof(*r)); } void pt_md_init(void) { + /* Nothing to do */ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108061749.p76HnLPq061321>