diff options
Diffstat (limited to 'gdb/target.c')
-rw-r--r-- | gdb/target.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |