aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 10:52:04 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:07 -0700
commit3ee3b2700d59ec1048989a3bf190882740d2ea8b (patch)
treebd46219093e5e0118256d9f47d3a7cc694de1702 /gdb/valops.c
parent391f86284f6fff1011ace7136f4bd2bb438de3c6 (diff)
downloadgdb-3ee3b2700d59ec1048989a3bf190882740d2ea8b.zip
gdb-3ee3b2700d59ec1048989a3bf190882740d2ea8b.tar.gz
gdb-3ee3b2700d59ec1048989a3bf190882740d2ea8b.tar.bz2
Turn value_lazy and set_value_lazy functions into methods
This changes the value_lazy and set_value_lazy functions to be methods of value. Much of this patch was written by script. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 079b64d..1823b0b 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1343,7 +1343,7 @@ value_assign (struct value *toval, struct value *fromval)
information, but its contents are updated from FROMVAL. This
implies the returned value is not lazy, even if TOVAL was. */
val = value_copy (toval);
- set_value_lazy (val, 0);
+ val->set_lazy (0);
copy (value_contents (fromval), value_contents_raw (val));
/* We copy over the enclosing type and pointed-to offset from FROMVAL
@@ -1406,7 +1406,7 @@ address_of_variable (struct symbol *var, const struct block *b)
val = value_of_variable (var, b);
type = val->type ();
- if ((VALUE_LVAL (val) == lval_memory && value_lazy (val))
+ if ((VALUE_LVAL (val) == lval_memory && val->lazy ())
|| type->code () == TYPE_CODE_FUNC)
{
CORE_ADDR addr = value_address (val);
@@ -4078,7 +4078,7 @@ value_slice (struct value *array, int lowbound, int length)
slice_range_type);
slice_type->set_code (array_type->code ());
- if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
+ if (VALUE_LVAL (array) == lval_memory && array->lazy ())
slice = allocate_value_lazy (slice_type);
else
{