struct value *result = value::allocate (atype);
gdb::array_view<gdb_byte> contents = result->contents_raw ();
- gdb::array_view<const gdb_byte> lhs_contents = value_contents (arg1);
- gdb::array_view<const gdb_byte> rhs_contents = value_contents (arg2);
+ gdb::array_view<const gdb_byte> lhs_contents = arg1->contents ();
+ gdb::array_view<const gdb_byte> rhs_contents = arg2->contents ();
gdb::copy (lhs_contents, contents.slice (0, lhs_contents.size ()));
gdb::copy (rhs_contents, contents.slice (lhs_contents.size ()));
if (is_floating_type (type1))
{
*eff_type_x = type1;
- memcpy (x, value_contents (arg1).data (), type1->length ());
+ memcpy (x, arg1->contents ().data (), type1->length ());
}
else if (is_integral_type (type1))
{
if (is_floating_type (type2))
{
*eff_type_y = type2;
- memcpy (y, value_contents (arg2).data (), type2->length ());
+ memcpy (y, arg2->contents ().data (), type2->length ());
}
else if (is_integral_type (type2))
{
type2 = type1;
}
- v1.read_fixed_point (value_contents (arg1),
+ v1.read_fixed_point (arg1->contents (),
type_byte_order (type1), type1->is_unsigned (),
type1->fixed_point_scaling_factor ());
- v2.read_fixed_point (value_contents (arg2),
+ v2.read_fixed_point (arg2->contents (),
type_byte_order (type2), type2->is_unsigned (),
type2->fixed_point_scaling_factor ());
}
for (i = 0; i < high_bound - low_bound + 1; i++)
/* Duplicate the contents of elval into the destination vector. */
- copy (value_contents_all (elval),
+ copy (elval->contents_all (),
val_contents.slice (i * elt_len, elt_len));
return val;
{
value *tmp = value_binop (value_subscript (val1, i),
value_subscript (val2, i), op);
- copy (value_contents_all (tmp),
+ copy (tmp->contents_all (),
val_contents.slice (i * elsize, elsize));
}
type1 = check_typedef (arg1->type ());
if (is_floating_value (arg1))
- return target_float_is_zero (value_contents (arg1).data (), type1);
+ return target_float_is_zero (arg1->contents ().data (), type1);
len = type1->length ();
- p = value_contents (arg1).data ();
+ p = arg1->contents ().data ();
while (--len >= 0)
{
{
int len1 = arg1->type ()->length ();
int len2 = arg2->type ()->length ();
- const gdb_byte *s1 = value_contents (arg1).data ();
- const gdb_byte *s2 = value_contents (arg2).data ();
+ const gdb_byte *s1 = arg1->contents ().data ();
+ const gdb_byte *s2 = arg2->contents ().data ();
int i, len = len1 < len2 ? len1 : len2;
for (i = 0; i < len; i++)
&& ((len = (int) type1->length ())
== (int) type2->length ()))
{
- p1 = value_contents (arg1).data ();
- p2 = value_contents (arg2).data ();
+ p1 = arg1->contents ().data ();
+ p2 = arg2->contents ().data ();
while (--len >= 0)
{
if (*p1++ != *p2++)
return (type1->code () == type2->code ()
&& type1->length () == type2->length ()
- && memcmp (value_contents (arg1).data (),
- value_contents (arg2).data (),
+ && memcmp (arg1->contents ().data (),
+ arg2->contents ().data (),
type1->length ()) == 0);
}
if (is_integral_type (type) || is_floating_value (arg1)
|| (type->code () == TYPE_CODE_ARRAY && type->is_vector ())
|| type->code () == TYPE_CODE_COMPLEX)
- return value_from_contents (type, value_contents (arg1).data ());
+ return value_from_contents (type, arg1->contents ().data ());
else
error (_("Argument to positive operation not a number."));
}
for (i = 0; i < high_bound - low_bound + 1; i++)
{
value *tmp = value_neg (value_subscript (arg1, i));
- copy (value_contents_all (tmp),
+ copy (tmp->contents_all (),
val_contents.slice (i * elt_len, elt_len));
}
return val;
for (i = 0; i < high_bound - low_bound + 1; i++)
{
value *tmp = value_complement (value_subscript (arg1, i));
- copy (value_contents_all (tmp),
+ copy (tmp->contents_all (),
val_contents.slice (i * elt_len, elt_len));
}
}
&& eltype->code () != TYPE_CODE_ENUM
&& eltype->code () != TYPE_CODE_BOOL)
error (_("First argument of 'IN' has wrong type"));
- member = value_bit_index (settype, value_contents (set).data (),
+ member = value_bit_index (settype, set->contents ().data (),
value_as_long (element));
if (member < 0)
error (_("First argument of 'IN' not in range"));