aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-tdep.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-10-26 19:34:09 +0000
committerPedro Alves <palves@redhat.com>2012-10-26 19:34:09 +0000
commit144db8270db6f4f3c5f0f59f08809ba14c5bc826 (patch)
treeb0b11f0405b524f67650acfaf24d30e7b7028549 /gdb/amd64-tdep.c
parent940c3c0683afd9d13629a9104695a24ed0fa82a3 (diff)
downloadgdb-144db8270db6f4f3c5f0f59f08809ba14c5bc826.zip
gdb-144db8270db6f4f3c5f0f59f08809ba14c5bc826.tar.gz
gdb-144db8270db6f4f3c5f0f59f08809ba14c5bc826.tar.bz2
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/amd64-tdep.c')
-rw-r--r--gdb/amd64-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index a4172fc..2edaecf 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -1631,7 +1631,7 @@ amd64_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);