/* An implementation of an lval_funcs method to see whether a value is
a synthetic pointer. */
-static int
+static bool
check_pieced_synthetic_pointer (const value *value, LONGEST bit_offset,
int bit_length)
{
bit_length -= this_size_bits;
if (p->location != DWARF_VALUE_IMPLICIT_POINTER)
- return 0;
+ return false;
}
- return 1;
+ return true;
}
/* An implementation of an lval_funcs method to indirect through a
}
}
-/* Return nonzero if bits in V from OFFSET and LENGTH represent a
+/* Return true if bits in V from OFFSET and LENGTH represent a
synthetic pointer. */
-static int
+static bool
lval_func_check_synthetic_pointer (const struct value *v,
LONGEST offset, int length)
{
end++;
if (end > c->n)
- return 0;
+ return false;
for (i = start; i < end; i++)
{
if (!c->val->bits_synthetic_pointer (c->indices[i] * elsize + comp_offset,
comp_length))
- return 0;
+ return false;
}
- return 1;
+ return true;
}
static void *
{
struct type *elttype = check_typedef (type->target_type ());
struct value *deref_val = NULL;
- const int value_is_synthetic
+ const bool value_is_synthetic
= original_value->bits_synthetic_pointer (TARGET_CHAR_BIT * embedded_offset,
TARGET_CHAR_BIT * type->length ());
const int must_coerce_ref = ((options->addressprint && value_is_synthetic)
insert_into_bit_range_vector (&m_optimized_out, offset, length);
}
-int
+bool
value::bits_synthetic_pointer (LONGEST offset, LONGEST length) const
{
if (m_lval != lval_computed
|| !m_location.computed.funcs->check_synthetic_pointer)
- return 0;
+ return false;
return m_location.computed.funcs->check_synthetic_pointer (this, offset,
length);
}
/* Given a value, determine whether the bits starting at OFFSET and
extending for LENGTH bits are a synthetic pointer. */
- int bits_synthetic_pointer (LONGEST offset, LONGEST length) const;
+ bool bits_synthetic_pointer (LONGEST offset, LONGEST length) const;
/* Increase this value's reference count. */
void incref ()
/* If non-NULL, this is used to determine whether the indicated bits
of VALUE are a synthetic pointer. */
- int (*check_synthetic_pointer) (const struct value *value,
- LONGEST offset, int length);
+ bool (*check_synthetic_pointer) (const struct value *value,
+ LONGEST offset, int length);
/* Return a duplicate of VALUE's closure, for use in a new value.
This may simply return the same closure, if VALUE's is