+2012-10-26 Pedro Alves <palves@redhat.com>
+
+ * amd64-tdep.c (amd64_relocate_instruction): Use
+ store_unsigned_integer instead of memcpy.
+ * i386-tdep.c (i386_relocate_instruction): Ditto.
+
2012-10-26 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event): Merge handling of
/* Where "ret" in the original code will return to. */
ret_addr = oldloc + insn_length;
push_buf[0] = 0x68; /* pushq $... */
- memcpy (&push_buf[1], &ret_addr, 4);
+ store_unsigned_integer (&push_buf[1], 4, byte_order, ret_addr);
/* Push the push. */
append_insns (to, 5, push_buf);
/* Where "ret" in the original code will return to. */
ret_addr = oldloc + insn_length;
push_buf[0] = 0x68; /* pushq $... */
- memcpy (&push_buf[1], &ret_addr, 4);
+ store_unsigned_integer (&push_buf[1], 4, byte_order, ret_addr);
/* Push the push. */
append_insns (to, 5, push_buf);