forked from Imagelibrary/binutils-gdb
Make value_must_coerce_to_target return a bool
... and move comment to header file. gdb/ChangeLog: * valops.c (value_must_coerce_to_target): Change return type to bool. * value.h (value_must_coerce_to_target): Likewise.
This commit is contained in:
11
gdb/valops.c
11
gdb/valops.c
@@ -1343,10 +1343,9 @@ address_of_variable (struct symbol *var, const struct block *b)
|
||||
return val;
|
||||
}
|
||||
|
||||
/* Return one if VAL does not live in target memory, but should in order
|
||||
to operate on it. Otherwise return zero. */
|
||||
/* See value.h. */
|
||||
|
||||
int
|
||||
bool
|
||||
value_must_coerce_to_target (struct value *val)
|
||||
{
|
||||
struct type *valtype;
|
||||
@@ -1355,7 +1354,7 @@ value_must_coerce_to_target (struct value *val)
|
||||
if (VALUE_LVAL (val) != not_lval
|
||||
&& VALUE_LVAL (val) != lval_internalvar
|
||||
&& VALUE_LVAL (val) != lval_xcallable)
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
valtype = check_typedef (value_type (val));
|
||||
|
||||
@@ -1364,9 +1363,9 @@ value_must_coerce_to_target (struct value *val)
|
||||
case TYPE_CODE_ARRAY:
|
||||
return TYPE_VECTOR (valtype) ? 0 : 1;
|
||||
case TYPE_CODE_STRING:
|
||||
return 1;
|
||||
return true;
|
||||
default:
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user