diff options
author | Tom Tromey <tom@tromey.com> | 2023-02-09 06:55:48 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:22:20 -0700 |
commit | 736355f2e186a6a5275cac26d9486a5cc28f755c (patch) | |
tree | 5a528ef4fc5572a7f05b366624faa4905bde41b1 /gdb/valarith.c | |
parent | 6f9c9d71c2420e9bc6825cef59a922f5fb863e1a (diff) | |
download | gdb-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/valarith.c')
-rw-r--r-- | gdb/valarith.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index 427cafd..0ab684a 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -93,7 +93,7 @@ value_ptradd (struct value *arg1, LONGEST arg2) result = value_from_pointer (valptrtype, value_as_address (arg1) + sz * arg2); - if (VALUE_LVAL (result) != lval_internalvar) + if (result->lval () != lval_internalvar) result->set_component_location (arg1); return result; } @@ -159,7 +159,7 @@ value_subscript (struct value *array, LONGEST index) if (!lowerbound.has_value ()) lowerbound = 0; - if (VALUE_LVAL (array) != lval_memory) + if (array->lval () != lval_memory) return value_subscripted_rvalue (array, index, *lowerbound); gdb::optional<LONGEST> upperbound @@ -235,7 +235,7 @@ value_subscripted_rvalue (struct value *array, LONGEST index, if (index < lowerbound || (!array_upper_bound_undefined && elt_offs >= type_length_units (array_type)) - || (VALUE_LVAL (array) != lval_memory && array_upper_bound_undefined)) + || (array->lval () != lval_memory && array_upper_bound_undefined)) { if (type_not_associated (array_type)) error (_("no such vector element (vector not associated)")); @@ -532,7 +532,7 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op, if (return_type == NULL) error (_("Xmethod is missing return type.")); - return value::zero (return_type, VALUE_LVAL (arg1)); + return value::zero (return_type, arg1->lval ()); } return argvec[0]->call_xmethod (argvec.slice (1)); } @@ -541,7 +541,7 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op, struct type *return_type; return_type = check_typedef (argvec[0]->type ())->target_type (); - return value::zero (return_type, VALUE_LVAL (arg1)); + return value::zero (return_type, arg1->lval ()); } return call_function_by_hand (argvec[0], NULL, argvec.slice (1, 2 - static_memfuncp)); @@ -645,7 +645,7 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside) if (return_type == NULL) error (_("Xmethod is missing return type.")); - return value::zero (return_type, VALUE_LVAL (arg1)); + return value::zero (return_type, arg1->lval ()); } return argvec[0]->call_xmethod (argvec[1]); } @@ -654,7 +654,7 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside) struct type *return_type; return_type = check_typedef (argvec[0]->type ())->target_type (); - return value::zero (return_type, VALUE_LVAL (arg1)); + return value::zero (return_type, arg1->lval ()); } return call_function_by_hand (argvec[0], NULL, argvec.slice (1, nargs)); |