diff --git a/lib/libthread_db/arch/amd64/libpthread_md.c b/lib/libthread_db/arch/amd64/libpthread_md.c index 646d36d564fe..624e650cacf0 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 */ }