@@ -1005,7 +1005,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type,
retval = value_at_lazy (subobj_type,
address + subobj_offset);
if (in_stack_memory)
- set_value_stack (retval, 1);
+ retval->set_stack (1);
}
break;
@@ -288,7 +288,7 @@ frame_unwind_got_memory (frame_info_ptr frame, int regnum, CORE_ADDR addr)
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;
}
@@ -1376,7 +1376,7 @@ value_repeat (struct value *arg1, int count)
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 ()));
@@ -1161,18 +1161,6 @@ value_contents_copy (struct value *dst, LONGEST dst_offset,
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)
{
@@ -3708,7 +3696,7 @@ value_fetch_lazy_memory (struct value *val)
struct type *type = check_typedef (val->enclosing_type ());
if (type->length ())
- read_value_memory (val, 0, value_stack (val),
+ read_value_memory (val, 0, val->stack (),
addr, value_contents_all_raw (val).data (),
type_length_units (type));
}
@@ -296,6 +296,12 @@ struct value
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. */
@@ -558,9 +564,6 @@ extern const struct lval_funcs *value_computed_funcs (const struct value *);
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. */