From e8c9e0a18f11d0247f43aecf6771494ee033177a Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 28 Jan 2011 16:00:16 +0000 Subject: 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(-) (limited to 'gdb/target.c') diff --git a/gdb/target.c b/gdb/target.c index 710af02..ad695a1 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -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 -- cgit v1.1