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 | |
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.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/target.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8b07d70..aab7ed1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2011-01-28 Pedro Alves <pedro@codesourcery.com> + * target.c (memory_xfer_partial): No need to restore shadows if we + haven't read anything. + +2011-01-28 Pedro Alves <pedro@codesourcery.com> + * mips-tdep.c (mips_print_register): Use get_frame_register_value and val_print_scalar_formatted. 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 |