diff options
author | Yao Qi <yao@codesourcery.com> | 2014-02-23 14:34:29 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-02-24 14:31:42 +0800 |
commit | bc113b4e3e6a47e0a5f351a3b9406fa0b1584dbe (patch) | |
tree | 92ddfc49e76db2a6be00157383e31f27bb9545cb /gdb/target.h | |
parent | 01cb880427d5fe2f652ca8b455012fd05ae962ac (diff) | |
download | gdb-bc113b4e3e6a47e0a5f351a3b9406fa0b1584dbe.zip gdb-bc113b4e3e6a47e0a5f351a3b9406fa0b1584dbe.tar.gz gdb-bc113b4e3e6a47e0a5f351a3b9406fa0b1584dbe.tar.bz2 |
Rename TARGET_XFER_E_UNAVAILABLE to TARGET_XFER_UNAVAILABLE
Nowadays, TARGET_XFER_E_UNAVAILABLE isn't regarded as an error in
to_xfer_partial interface, so _E_ looks odd. This patch is to
replace TARGET_XFER_E_UNAVAILABLE with TARGET_XFER_UNAVAILABLE,
and change its value from -2 to 2. Since there is no comparison
on the value of 'enum target_xfer_status', so it should be safe.
gdb:
2014-02-24 Yao Qi <yao@codesourcery.com>
* target.h (enum target_xfer_status)
<TARGET_XFER_E_UNAVAILABLE>: Rename it to ...
<TARGET_XFER_UNAVAILABLE>: ... it with setting value 2
explicitly. New.
* corefile.c (memory_error_message): User updated.
* exec.c (section_table_read_available_memory): Likewise.
* record-btrace.c (record_btrace_xfer_partial): Likewise.
* target.c (target_xfer_status_to_string): Likewise.
(raw_memory_xfer_partial): Likewise.
(memory_xfer_partial_1, target_xfer_partial): Likewise.
* valops.c (read_value_memory): Likewise.
* exec.h: Update comments.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/target.h b/gdb/target.h index 9143ee2..db248a8 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -213,15 +213,14 @@ enum target_xfer_status /* No further transfer is possible. */ TARGET_XFER_EOF = 0, + /* The piece of the object requested is unavailable. */ + TARGET_XFER_UNAVAILABLE = 2, + /* Generic I/O error. Note that it's important that this is '-1', as we still have target_xfer-related code returning hardcoded '-1' on error. */ TARGET_XFER_E_IO = -1, - /* Transfer failed because the piece of the object requested is - unavailable. */ - TARGET_XFER_E_UNAVAILABLE = -2, - /* Keep list in sync with target_xfer_status_to_string. */ }; @@ -628,7 +627,7 @@ struct target_ops 'enum target_xfer_status' value). Save the number of bytes actually transferred in *XFERED_LEN if transfer is successful (TARGET_XFER_OK) or the number unavailable bytes if the requested - data is unavailable (TARGET_XFER_E_UNAVAILABLE). *XFERED_LEN + data is unavailable (TARGET_XFER_UNAVAILABLE). *XFERED_LEN smaller than LEN does not indicate the end of the object, only the end of the transfer; higher level code should continue transferring if desired. This is handled in target.c. |