* rs6000-nat.c (child_xfer_memory): Compute the right address when
authorJoel Brobecker <brobecker@gnat.com>
Tue, 10 Jun 2003 20:34:09 +0000 (20:34 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 10 Jun 2003 20:34:09 +0000 (20:34 +0000)
        fetching the trailing bytes of the buffer we are about to write.

gdb/ChangeLog
gdb/rs6000-nat.c

index 83d85ee25bccff73f35920ca08a5cc2bfbf5c6fa..091e72c54349fe32f46d1499744a1a7195f4b0ff 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-10  J. Brobecker  <brobecker@gnat.com>
+
+       * 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  <cagney@redhat.com>
 
        * remote-fileio.h (REMOTE_FILEIO_H): Replace FILEIO_H.
index c5a0ea73d8fa8b4d0249e26f8383d83df1965660..e825529ba95876f257149662828946ccb7574a17 100644 (file)
@@ -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. */
This page took 0.041214 seconds and 4 git commands to generate.