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 */
 }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to