aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-02-09 06:55:48 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:20 -0700
commit736355f2e186a6a5275cac26d9486a5cc28f755c (patch)
tree5a528ef4fc5572a7f05b366624faa4905bde41b1 /gdb/eval.c
parent6f9c9d71c2420e9bc6825cef59a922f5fb863e1a (diff)
downloadgdb-736355f2e186a6a5275cac26d9486a5cc28f755c.zip
gdb-736355f2e186a6a5275cac26d9486a5cc28f755c.tar.gz
gdb-736355f2e186a6a5275cac26d9486a5cc28f755c.tar.bz2
Remove deprecated_lval_hack
This removes deprecated_lval_hack and the VALUE_LVAL macro, replacing all uses with a call to value::lval. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index e043991..f8bbb9e 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1224,7 +1224,7 @@ eval_op_structop_struct (struct type *expect_type, struct expression *exp,
struct value *arg3 = value_struct_elt (&arg1, {}, string,
NULL, "structure");
if (noside == EVAL_AVOID_SIDE_EFFECTS)
- arg3 = value::zero (arg3->type (), VALUE_LVAL (arg3));
+ arg3 = value::zero (arg3->type (), arg3->lval ());
return arg3;
}
@@ -1280,7 +1280,7 @@ eval_op_structop_ptr (struct type *expect_type, struct expression *exp,
struct value *arg3 = value_struct_elt (&arg1, {}, string,
NULL, "structure pointer");
if (noside == EVAL_AVOID_SIDE_EFFECTS)
- arg3 = value::zero (arg3->type (), VALUE_LVAL (arg3));
+ arg3 = value::zero (arg3->type (), arg3->lval ());
return arg3;
}
@@ -1447,7 +1447,7 @@ eval_op_subscript (struct type *expect_type, struct expression *exp,
}
if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value::zero (type->target_type (), VALUE_LVAL (arg1));
+ return value::zero (type->target_type (), arg1->lval ());
else
return value_subscript (arg1, value_as_long (arg2));
}
@@ -2590,7 +2590,7 @@ evaluate_subexp_for_address_base (struct expression *exp, enum noside noside,
if (TYPE_IS_REFERENCE (type))
return value::zero (lookup_pointer_type (type->target_type ()),
not_lval);
- else if (VALUE_LVAL (x) == lval_memory || value_must_coerce_to_target (x))
+ else if (x->lval () == lval_memory || value_must_coerce_to_target (x))
return value::zero (lookup_pointer_type (x->type ()),
not_lval);
else
@@ -2875,7 +2875,7 @@ var_msym_value_operation::evaluate_for_cast (struct type *to_type,
val = value_cast (to_type, val);
/* Don't allow e.g. '&(int)var_with_no_debug_info'. */
- if (VALUE_LVAL (val) == lval_memory)
+ if (val->lval () == lval_memory)
{
if (val->lazy ())
val->fetch_lazy ();
@@ -2896,7 +2896,7 @@ var_value_operation::evaluate_for_cast (struct type *to_type,
val = value_cast (to_type, val);
/* Don't allow e.g. '&(int)var_with_no_debug_info'. */
- if (VALUE_LVAL (val) == lval_memory)
+ if (val->lval () == lval_memory)
{
if (val->lazy ())
val->fetch_lazy ();