This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[ob] No need to restore shadows if we haven't read anything.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 28 Jan 2011 16:00:52 +0000
- Subject: [ob] No need to restore shadows if we haven't read anything.
Applied.
--
Pedro Alves
2011-01-28 Pedro Alves <pedro@codesourcery.com>
gdb/
* target.c (memory_xfer_partial): No need to restore shadows if we
haven't read anything.
---
gdb/target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: src/gdb/target.c
===================================================================
--- src.orig/gdb/target.c 2011-01-19 18:26:47.371219996 +0000
+++ src/gdb/target.c 2011-01-28 15:55:11.697137000 +0000
@@ -1414,7 +1414,7 @@ memory_xfer_partial (struct target_ops *
}
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