PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
away part of the register's value.
+2003-05-29 Jim Blandy <jimb@redhat.com>
+
+ * linux-low.c (usr_store_inferior_registers): Transfer buf in
+ PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
+ if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
+ away part of the register's value.
+
2003-04-24 Andrew Cagney <cagney@redhat.com>
* low-nbsd.c (fetch_inferior_registers):
{
errno = 0;
ptrace (PTRACE_POKEUSER, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- *(int *) (buf + i));
+ *(PTRACE_XFER_TYPE *) (buf + i));
if (errno != 0)
{
if ((*the_low_target.cannot_store_register) (regno) == 0)
return;
}
}
- regaddr += sizeof (int);
+ regaddr += sizeof (PTRACE_XFER_TYPE);
}
}
else