gdb: trivial changes to use array_view

Change a few relatively obvious spots using value contents to propagate
the use array_view a bit more.

Change-Id: I5338a60986f06d5969fec803d04f8423c9288a15
This commit is contained in:
Simon Marchi 2021-10-25 23:50:22 -04:00
parent 2a50938ab7
commit 46680d22de
5 changed files with 19 additions and 32 deletions

View file

@ -933,12 +933,10 @@ fixed_point_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
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 ());
}
@ -948,8 +946,7 @@ fixed_point_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
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 ());