gdb_byte *buffer, size_t length)
{
ULONGEST xfered_total = 0;
- struct gdbarch *arch = get_value_arch (val);
+ struct gdbarch *arch = val->arch ();
int unit_size = gdbarch_addressable_memory_unit_size (arch);
enum target_object object;
/* See value.h. */
struct gdbarch *
-get_value_arch (const struct value *value)
+value::arch () const
{
- return value->type ()->arch ();
+ return type ()->arch ();
}
int
gdb::array_view<gdb_byte>
value_contents_raw (struct value *value)
{
- struct gdbarch *arch = get_value_arch (value);
+ struct gdbarch *arch = value->arch ();
int unit_size = gdbarch_addressable_memory_unit_size (arch);
allocate_value_contents (value, true);
struct value *src, LONGEST src_offset, LONGEST length)
{
LONGEST src_bit_offset, dst_bit_offset, bit_length;
- struct gdbarch *arch = get_value_arch (src);
+ struct gdbarch *arch = src->arch ();
int unit_size = gdbarch_addressable_memory_unit_size (arch);
/* A lazy DST would make that this copy operation useless, since as
{
case INTERNALVAR_VALUE:
addr = value_contents_writeable (var->u.value).data ();
- arch = get_value_arch (var->u.value);
+ arch = var->u.value->arch ();
unit_size = gdbarch_addressable_memory_unit_size (arch);
if (bitsize)
{
struct value *v;
struct type *type;
- struct gdbarch *arch = get_value_arch (arg1);
+ struct gdbarch *arch = arg1->arch ();
int unit_size = gdbarch_addressable_memory_unit_size (arch);
arg_type = check_typedef (arg_type);
void deprecated_set_type (struct type *type)
{ m_type = type; }
+ /* Return the gdbarch associated with the value. */
+ struct gdbarch *arch () const;
+
/* Type of value; either not an lval, or one of the various
different possible kinds of lval. */
ULONGEST m_limited_length = 0;
};
-/* Return the gdbarch associated with the value. */
-
-extern struct gdbarch *get_value_arch (const struct value *value);
-
/* Only used for bitfields; number of bits contained in them. */
extern LONGEST value_bitsize (const struct value *);