Turn various value copying-related functions into methods

This patch turns a grab bag of value functions to methods of value.
These are done together because their implementations are
interrelated.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-02-01 07:27:50 -07:00
parent e3fb3c4772
commit 6c49729e59
16 changed files with 193 additions and 197 deletions

View File

@@ -1866,12 +1866,11 @@ extract_bitfield_from_watchpoint_value (struct watchpoint *w, struct value *val)
bit_val = value::allocate (val->type ());
unpack_value_bitfield (bit_val,
w->val_bitpos,
w->val_bitsize,
val->contents_for_printing ().data (),
val->offset (),
val);
val->unpack_bitfield (bit_val,
w->val_bitpos,
w->val_bitsize,
val->contents_for_printing ().data (),
val->offset ());
return bit_val;
}