mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
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.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user