forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -886,7 +886,7 @@ target_xfer_status_to_string (enum target_xfer_status status)
|
||||
switch (status)
|
||||
{
|
||||
CASE(TARGET_XFER_E_IO);
|
||||
CASE(TARGET_XFER_E_UNAVAILABLE);
|
||||
CASE(TARGET_XFER_UNAVAILABLE);
|
||||
default:
|
||||
return "<unknown>";
|
||||
}
|
||||
@@ -1099,7 +1099,7 @@ raw_memory_xfer_partial (struct target_ops *ops, gdb_byte *readbuf,
|
||||
break;
|
||||
|
||||
/* Stop if the target reports that the memory is not available. */
|
||||
if (res == TARGET_XFER_E_UNAVAILABLE)
|
||||
if (res == TARGET_XFER_UNAVAILABLE)
|
||||
break;
|
||||
|
||||
/* We want to continue past core files to executables, but not
|
||||
@@ -1212,7 +1212,7 @@ memory_xfer_partial_1 (struct target_ops *ops, enum target_object object,
|
||||
/* No use trying further, we know some memory starting
|
||||
at MEMADDR isn't available. */
|
||||
*xfered_len = len;
|
||||
return TARGET_XFER_E_UNAVAILABLE;
|
||||
return TARGET_XFER_UNAVAILABLE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1479,7 +1479,7 @@ target_xfer_partial (struct target_ops *ops,
|
||||
/* Check implementations of to_xfer_partial update *XFERED_LEN
|
||||
properly. Do assertion after printing debug messages, so that we
|
||||
can find more clues on assertion failure from debugging messages. */
|
||||
if (retval == TARGET_XFER_OK || retval == TARGET_XFER_E_UNAVAILABLE)
|
||||
if (retval == TARGET_XFER_OK || retval == TARGET_XFER_UNAVAILABLE)
|
||||
gdb_assert (*xfered_len > 0);
|
||||
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user