summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-08-06 17:49:21 +0000
committermarius <marius@FreeBSD.org>2011-08-06 17:49:21 +0000
commit80d87bdabee2d39ce8040a53992970c7245fb4e4 (patch)
treec426c6835fd3440c3c016f0bc15463ce80d02e4d
parentc027f659aec89f64db78bfcc9d1f69960b2ba7df (diff)
downloadFreeBSD-src-80d87bdabee2d39ce8040a53992970c7245fb4e4.zip
FreeBSD-src-80d87bdabee2d39ce8040a53992970c7245fb4e4.tar.gz
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
-rw-r--r--lib/libthread_db/arch/amd64/libpthread_md.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libthread_db/arch/amd64/libpthread_md.c b/lib/libthread_db/arch/amd64/libpthread_md.c
index 646d36d..624e650 100644
--- a/lib/libthread_db/arch/amd64/libpthread_md.c
+++ b/lib/libthread_db/arch/amd64/libpthread_md.c
@@ -92,18 +92,21 @@ pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
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 */
}
OpenPOWER on IntegriCloud