forked from Imagelibrary/binutils-gdb
Turn remaining value_contents functions into methods
This turns the remaining value_contents functions -- value_contents, value_contents_all, value_contents_for_printing, and value_contents_for_printing_const -- into methods of value. It also converts the static functions require_not_optimized_out and require_available to be private methods. Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
@@ -156,7 +156,7 @@ rw_pieced_value (value *v, value *from, bool check_optimized)
|
||||
gdb_assert (!check_optimized || from == nullptr);
|
||||
if (from != nullptr)
|
||||
{
|
||||
from_contents = value_contents (from).data ();
|
||||
from_contents = from->contents ().data ();
|
||||
v_contents = nullptr;
|
||||
}
|
||||
else
|
||||
@@ -377,7 +377,7 @@ rw_pieced_value (value *v, value *from, bool check_optimized)
|
||||
bits_to_skip += p->offset;
|
||||
|
||||
copy_bitwise (v_contents, offset,
|
||||
value_contents_all (p->v.value).data (),
|
||||
p->v.value->contents_all ().data (),
|
||||
bits_to_skip,
|
||||
this_size_bits, bits_big_endian);
|
||||
}
|
||||
@@ -560,7 +560,7 @@ indirect_pieced_value (value *value)
|
||||
encode address spaces and other things in CORE_ADDR. */
|
||||
bfd_endian byte_order = gdbarch_byte_order (get_frame_arch (frame));
|
||||
LONGEST byte_offset
|
||||
= extract_signed_integer (value_contents (value), byte_order);
|
||||
= extract_signed_integer (value->contents (), byte_order);
|
||||
byte_offset += piece->v.ptr.offset;
|
||||
|
||||
return indirect_synthetic_pointer (piece->v.ptr.die_sect_off,
|
||||
@@ -1025,7 +1025,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type,
|
||||
if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG)
|
||||
subobj_offset += n - max;
|
||||
|
||||
copy (value_contents_all (val).slice (subobj_offset, len),
|
||||
copy (val->contents_all ().slice (subobj_offset, len),
|
||||
retval->contents_raw ());
|
||||
}
|
||||
break;
|
||||
@@ -1145,7 +1145,7 @@ dwarf_expr_context::fetch_address (int n)
|
||||
ULONGEST result;
|
||||
|
||||
dwarf_require_integral (result_val->type ());
|
||||
result = extract_unsigned_integer (value_contents (result_val), byte_order);
|
||||
result = extract_unsigned_integer (result_val->contents (), byte_order);
|
||||
|
||||
/* For most architectures, calling extract_unsigned_integer() alone
|
||||
is sufficient for extracting an address. However, some
|
||||
@@ -2351,7 +2351,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
|
||||
else
|
||||
result_val
|
||||
= value_from_contents (type,
|
||||
value_contents_all (result_val).data ());
|
||||
result_val->contents_all ().data ());
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user