diff options
author | Joel Brobecker <brobecker@gnat.com> | 2003-06-10 20:34:09 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2003-06-10 20:34:09 +0000 |
commit | a191ea8dac5660849327c57d8efe55bd67e8b3c7 (patch) | |
tree | 8da3dace239c1c6e871c3937701c0784807a46bc /gdb/rs6000-nat.c | |
parent | 5ef0935e19c6953533c4d7b52284b0d317a195c8 (diff) | |
download | gdb-a191ea8dac5660849327c57d8efe55bd67e8b3c7.zip gdb-a191ea8dac5660849327c57d8efe55bd67e8b3c7.tar.gz gdb-a191ea8dac5660849327c57d8efe55bd67e8b3c7.tar.bz2 |
* 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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index c5a0ea7..e825529 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. */ |