summaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-10-26 19:34:07 +0000
committerPedro Alves <palves@redhat.com>2012-10-26 19:34:07 +0000
commitc17e24e0248db3f291d0bda1d5788e1617182916 (patch)
tree43b65a3cefc9b59f832dfeda32b89a570a8ff135 /gdb/i386-tdep.c
parent01d04876ef93141d981285bafc903f66ab8e63ab (diff)
downloadgdb-c17e24e0248db3f291d0bda1d5788e1617182916.tar.gz
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.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r--gdb/i386-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 2768dbc9630..df29b71532e 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -750,7 +750,7 @@ i386_relocate_instruction (struct gdbarch *gdbarch,
/* 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);