retval = value_at_lazy (subobj_type,
address + subobj_offset);
if (in_stack_memory)
- set_value_stack (retval, 1);
+ retval->set_stack (1);
}
break;
struct gdbarch *gdbarch = frame_unwind_arch (frame);
struct value *v = value_at_lazy (register_type (gdbarch, regnum), addr);
- set_value_stack (v, 1);
+ v->set_stack (1);
return v;
}
VALUE_LVAL (val) = lval_memory;
set_value_address (val, value_address (arg1));
- read_value_memory (val, 0, value_stack (val), value_address (val),
+ read_value_memory (val, 0, val->stack (), value_address (val),
value_contents_all_raw (val).data (),
type_length_units (val->enclosing_type ()));
value_contents_copy_raw (dst, dst_offset, src, src_offset, length);
}
-int
-value_stack (const struct value *value)
-{
- return value->m_stack;
-}
-
-void
-set_value_stack (struct value *value, int val)
-{
- value->m_stack = val;
-}
-
gdb::array_view<const gdb_byte>
value_contents (struct value *value)
{
gdb_assert (len >= 0);
if (len > 0)
- read_value_memory (val, 0, value_stack (val), addr,
+ read_value_memory (val, 0, val->stack (), addr,
value_contents_all_raw (val).data (), len);
}
void set_enclosing_type (struct type *new_type);
+ int stack () const
+ { return m_stack; }
+
+ void set_stack (int val)
+ { m_stack = val; }
+
/* Type of value; either not an lval, or one of the various
different possible kinds of lval. */
extern void *value_computed_closure (const struct value *value);
-extern int value_stack (const struct value *);
-extern void set_value_stack (struct value *value, int val);
-
/* Throw an error complaining that the value has been optimized
out. */