]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/
authorPedro Alves <palves@redhat.com>
Fri, 28 Jan 2011 16:00:16 +0000 (16:00 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 28 Jan 2011 16:00:16 +0000 (16:00 +0000)
* target.c (memory_xfer_partial): No need to restore shadows if we
haven't read anything.

gdb/ChangeLog
gdb/target.c

index 8b07d70c1b3e23c45550cde392071cafe7926a8c..aab7ed1a0e7e3623292ea24cc8086cc4ad0e294c 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-28  Pedro Alves  <pedro@codesourcery.com>
+
+       * target.c (memory_xfer_partial): No need to restore shadows if we
+       haven't read anything.
+
 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
 
        * mips-tdep.c (mips_print_register): Use get_frame_register_value
index 710af02c7dc30c00f00ffa89438929f1d57997df..ad695a171b33319d2b9f2c07c376c277f2887b5a 100644 (file)
@@ -1414,7 +1414,7 @@ memory_xfer_partial (struct target_ops *ops, enum target_object object,
     }
   while (ops != NULL);
 
-  if (readbuf && !show_memory_breakpoints)
+  if (res > 0 && readbuf != NULL && !show_memory_breakpoints)
     breakpoint_restore_shadows (readbuf, memaddr, reg_len);
 
   /* Make sure the cache gets updated no matter what - if we are writing