summaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2003-06-10 20:34:09 +0000
committerJoel Brobecker <brobecker@gnat.com>2003-06-10 20:34:09 +0000
commitf3df42fa3c8e517d288a8d447de8b564ddb6c781 (patch)
tree672a0bd269bea491e4d40693a79d123e19fd04c5 /gdb/rs6000-nat.c
parent8e390dfc8649c46c7e65c6beb85b1f442838666a (diff)
downloadgdb-f3df42fa3c8e517d288a8d447de8b564ddb6c781.tar.gz
* rs6000-nat.c (child_xfer_memory): Compute the right address when
fetching the trailing bytes of the buffer we are about to write.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index c5a0ea73d8f..e825529ba95 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -485,7 +485,8 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
/* Fetch trailing memory needed for alignment. */
if (addr + count * sizeof (int) > memaddr + len)
- if (!read_word (addr, buf + count - 1, arch64))
+ if (!read_word (addr + (count - 1) * sizeof (int),
+ buf + count - 1, arch64))
return 0;
/* Copy supplied data into memory buffer. */