diff options
author | Yao Qi <yao@codesourcery.com> | 2014-02-23 12:24:08 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-02-24 11:27:37 +0800 |
commit | 5c328c057e963faacc50796c650a5feb06762c67 (patch) | |
tree | 8e9c4f388e27f1997f3e95558ed8700b9a0650d9 /gdb/corefile.c | |
parent | daily update (diff) | |
download | binutils-gdb-5c328c057e963faacc50796c650a5feb06762c67.tar.gz binutils-gdb-5c328c057e963faacc50796c650a5feb06762c67.tar.bz2 binutils-gdb-5c328c057e963faacc50796c650a5feb06762c67.zip |
Remove TARGET_XFER_STATUS_ERROR_P
This patch removes macro TARGET_XFER_STATUS_ERROR_P, as Pedro pointed
out during patches review that TARGET_XFER_STATUS_ERROR_P tends to
be unnecessary.
gdb:
2014-02-24 Yao Qi <yao@codesourcery.com>
* target.h (TARGET_XFER_STATUS_ERROR_P): Remove.
* corefile.c (read_memory): Adjusted.
* target.c (target_write_with_progress): Adjusted.
Diffstat (limited to 'gdb/corefile.c')
-rw-r--r-- | gdb/corefile.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/corefile.c b/gdb/corefile.c index 048669b9d2e..815adaf46a0 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -260,13 +260,10 @@ read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len) memaddr + xfered, len - xfered, &xfered_len); - if (status == TARGET_XFER_EOF) - memory_error (TARGET_XFER_E_IO, memaddr + xfered); + if (status != TARGET_XFER_OK) + memory_error (status == TARGET_XFER_EOF ? TARGET_XFER_E_IO : status, + memaddr + xfered); - if (TARGET_XFER_STATUS_ERROR_P (status)) - memory_error (status, memaddr + xfered); - - gdb_assert (status == TARGET_XFER_OK); xfered += xfered_len; QUIT; } |