This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]