svn commit: r224826 - stable/8/lib/libthread_db/arch/amd64

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


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 */
 }
 


More information about the svn-src-all mailing list