else
{
int i;
- const gdb_byte *buf = value_contents (value).data ();
+ gdb::array_view<const gdb_byte> buf = value_contents (value);
fprintf_unfiltered (&debug_file, " bytes=");
fprintf_unfiltered (&debug_file, "[");
if (rust_enum_p (type))
{
- gdb::array_view<const gdb_byte> view (value_contents (lhs).data (),
- TYPE_LENGTH (type));
- type = resolve_dynamic_type (type, view, value_address (lhs));
+ type = resolve_dynamic_type (type, value_contents (lhs),
+ value_address (lhs));
if (rust_empty_enum_p (type))
error (_("Cannot access field %d of empty enum %s"),
struct type *type = value_type (lhs);
if (type->code () == TYPE_CODE_STRUCT && rust_enum_p (type))
{
- gdb::array_view<const gdb_byte> view (value_contents (lhs).data (),
- TYPE_LENGTH (type));
- type = resolve_dynamic_type (type, view, value_address (lhs));
+ type = resolve_dynamic_type (type, value_contents (lhs),
+ value_address (lhs));
if (rust_empty_enum_p (type))
error (_("Cannot access field %s of empty enum %s"),
type2 = type1;
}
- v1.read_fixed_point (gdb::make_array_view (value_contents (arg1).data (),
- TYPE_LENGTH (type1)),
+ v1.read_fixed_point (value_contents (arg1),
type_byte_order (type1), type1->is_unsigned (),
type1->fixed_point_scaling_factor ());
- v2.read_fixed_point (gdb::make_array_view (value_contents (arg2).data (),
- TYPE_LENGTH (type2)),
+ v2.read_fixed_point (value_contents (arg2),
type_byte_order (type2), type2->is_unsigned (),
type2->fixed_point_scaling_factor ());
}
value *fp_val = allocate_value (type1);
fp.write_fixed_point
- (gdb::make_array_view (value_contents_raw (fp_val).data (),
- TYPE_LENGTH (type1)),
+ (value_contents_raw (fp_val),
type_byte_order (type1),
type1->is_unsigned (),
type1->fixed_point_scaling_factor ());
|| is_fixed_point_type (type));
gdb_mpz vz;
- vz.read (gdb::make_array_view (value_contents (value).data (),
- TYPE_LENGTH (type)),
- type_byte_order (type), type->is_unsigned ());
+ vz.read (value_contents (value), type_byte_order (type),
+ type->is_unsigned ());
mpq_set_z (result.val, vz.val);
if (is_fixed_point_type (type))
/* Finally, create the result value, and pack the unscaled value
in it. */
struct value *result = allocate_value (to_type);
- unscaled.write (gdb::make_array_view (value_contents_raw (result).data (),
- TYPE_LENGTH (to_type)),
+ unscaled.write (value_contents_raw (result),
type_byte_order (to_type),
to_type->is_unsigned ());
{
gdb_mpq fp_val;
- fp_val.read_fixed_point
- (gdb::make_array_view (value_contents (arg2).data (),
- TYPE_LENGTH (type2)),
- type_byte_order (type2), type2->is_unsigned (),
- type2->fixed_point_scaling_factor ());
+ fp_val.read_fixed_point (value_contents (arg2),
+ type_byte_order (type2),
+ type2->is_unsigned (),
+ type2->fixed_point_scaling_factor ());
struct value *v = allocate_value (to_type);
target_float_from_host_double (value_contents_raw (v).data (),
value_contents (fromval).data ());
}
else
- {
- gdb::array_view<const gdb_byte> contents
- = gdb::make_array_view (value_contents (fromval).data (),
- TYPE_LENGTH (type));
- put_frame_register_bytes (frame, value_reg,
- value_offset (toval),
- contents);
- }
+ put_frame_register_bytes (frame, value_reg,
+ value_offset (toval),
+ value_contents (fromval));
}
gdb::observers::register_changed.notify (frame, value_reg);
else
{
int i;
- const gdb_byte *buf = value_contents (new_val).data ();
+ gdb::array_view<const gdb_byte> buf = value_contents (new_val);
if (VALUE_LVAL (new_val) == lval_register)
fprintf_unfiltered (&debug_file, " register=%d",