aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.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/ada-lang.c
parent391f86284f6fff1011ace7136f4bd2bb438de3c6 (diff)
downloadbinutils-3ee3b2700d59ec1048989a3bf190882740d2ea8b.zip
binutils-3ee3b2700d59ec1048989a3bf190882740d2ea8b.tar.gz
binutils-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/ada-lang.c')
-rw-r--r--gdb/ada-lang.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index baffea7..05f8c3f 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -557,7 +557,7 @@ coerce_unspec_val_to_type (struct value *val, struct type *type)
if (value_optimized_out (val))
result = allocate_optimized_out_value (type);
- else if (value_lazy (val)
+ else if (val->lazy ()
/* Be careful not to make a lazy not_lval value. */
|| (VALUE_LVAL (val) != not_lval
&& type->length () > val->type ()->length ()))
@@ -2810,7 +2810,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr,
v = allocate_value (type);
src = valaddr + offset;
}
- else if (VALUE_LVAL (obj) == lval_memory && value_lazy (obj))
+ else if (VALUE_LVAL (obj) == lval_memory && obj->lazy ())
{
int src_len = (bit_size + bit_offset + HOST_CHAR_BIT - 1) / 8;
gdb_byte *buf;
@@ -10852,7 +10852,7 @@ ada_var_msym_value_operation::evaluate_for_cast (struct type *expect_type,
an address of the result of a cast (view conversion in Ada). */
if (VALUE_LVAL (val) == lval_memory)
{
- if (value_lazy (val))
+ if (val->lazy ())
value_fetch_lazy (val);
VALUE_LVAL (val) = not_lval;
}
@@ -10874,7 +10874,7 @@ ada_var_value_operation::evaluate_for_cast (struct type *expect_type,
an address of the result of a cast (view conversion in Ada). */
if (VALUE_LVAL (val) == lval_memory)
{
- if (value_lazy (val))
+ if (val->lazy ())
value_fetch_lazy (val);
VALUE_LVAL (val) = not_lval;
}