Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Aug 2011 12:49:01 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r224826 - stable/8/lib/libthread_db/arch/amd64
Message-ID:  <201108131249.p7DCn1O5016527@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Sat Aug 13 12:49:00 2011
New Revision: 224826
URL: http://svn.freebsd.org/changeset/base/224826

Log:
  MFC: r224684
  
  Use the size of struct fpreg rather than of the pointer to it when copying
  the FPU state.
  
  Reviewed by:	marcel

Modified:
  stable/8/lib/libthread_db/arch/amd64/libpthread_md.c
Directory Properties:
  stable/8/lib/libthread_db/   (props changed)

Modified: stable/8/lib/libthread_db/arch/amd64/libpthread_md.c
==============================================================================
--- stable/8/lib/libthread_db/arch/amd64/libpthread_md.c	Sat Aug 13 12:47:10 2011	(r224825)
+++ stable/8/lib/libthread_db/arch/amd64/libpthread_md.c	Sat Aug 13 12:49:00 2011	(r224826)
@@ -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?201108131249.p7DCn1O5016527>