diff options
author | Pedro Alves <palves@redhat.com> | 2011-01-28 16:00:16 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-01-28 16:00:16 +0000 |
commit | e8c9e0a18f11d0247f43aecf6771494ee033177a (patch) | |
tree | 0f12e42c4ae5718bb3a22070c56f97d423fd1510 /gdb/target.c | |
parent | de15c4ab2db92fc9d3ac4cc264c42914db8a134f (diff) | |
download | gdb-e8c9e0a18f11d0247f43aecf6771494ee033177a.zip gdb-e8c9e0a18f11d0247f43aecf6771494ee033177a.tar.gz gdb-e8c9e0a18f11d0247f43aecf6771494ee033177a.tar.bz2 |
gdb/
* target.c (memory_xfer_partial): No need to restore shadows if we
haven't read anything.
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 |