svn commit: r224827 - stable/7/lib/libthread_db/arch/amd64

Marius Strobl marius at FreeBSD.org
Sat Aug 13 12:49:03 UTC 2011


Author: marius
Date: Sat Aug 13 12:49:02 2011
New Revision: 224827
URL: http://svn.freebsd.org/changeset/base/224827

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/7/lib/libthread_db/arch/amd64/libpthread_md.c
Directory Properties:
  stable/7/lib/libthread_db/   (props changed)

Modified: stable/7/lib/libthread_db/arch/amd64/libpthread_md.c
==============================================================================
--- stable/7/lib/libthread_db/arch/amd64/libpthread_md.c	Sat Aug 13 12:49:00 2011	(r224826)
+++ stable/7/lib/libthread_db/arch/amd64/libpthread_md.c	Sat Aug 13 12:49:02 2011	(r224827)
@@ -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 */
 }
 


More information about the svn-src-stable-7 mailing list