From: Joel Brobecker Date: Tue, 10 Jun 2003 20:34:09 +0000 (+0000) Subject: * rs6000-nat.c (child_xfer_memory): Compute the right address when X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a191ea8dac5660849327c57d8efe55bd67e8b3c7;p=binutils-gdb.git * rs6000-nat.c (child_xfer_memory): Compute the right address when fetching the trailing bytes of the buffer we are about to write. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 83d85ee25bc..091e72c5434 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-06-10 J. Brobecker + + * rs6000-nat.c (child_xfer_memory): Compute the right address when + fetching the trailing bytes of the buffer we are about to write. + 2003-06-10 Andrew Cagney * remote-fileio.h (REMOTE_FILEIO_H): Replace FILEIO_H. 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. */