mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 00:32:30 +08:00
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>
This commit is contained in:
@ -559,7 +559,7 @@ coerce_unspec_val_to_type (struct value *val, struct type *type)
|
||||
result = value::allocate_optimized_out (type);
|
||||
else if (val->lazy ()
|
||||
/* Be careful not to make a lazy not_lval value. */
|
||||
|| (VALUE_LVAL (val) != not_lval
|
||||
|| (val->lval () != not_lval
|
||||
&& type->length () > val->type ()->length ()))
|
||||
result = value::allocate_lazy (type);
|
||||
else
|
||||
@ -570,7 +570,7 @@ coerce_unspec_val_to_type (struct value *val, struct type *type)
|
||||
result->set_component_location (val);
|
||||
result->set_bitsize (val->bitsize ());
|
||||
result->set_bitpos (val->bitpos ());
|
||||
if (VALUE_LVAL (result) == lval_memory)
|
||||
if (result->lval () == lval_memory)
|
||||
result->set_address (val->address ());
|
||||
return result;
|
||||
}
|
||||
@ -2810,7 +2810,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr,
|
||||
v = value::allocate (type);
|
||||
src = valaddr + offset;
|
||||
}
|
||||
else if (VALUE_LVAL (obj) == lval_memory && obj->lazy ())
|
||||
else if (obj->lval () == lval_memory && obj->lazy ())
|
||||
{
|
||||
int src_len = (bit_size + bit_offset + HOST_CHAR_BIT - 1) / 8;
|
||||
gdb_byte *buf;
|
||||
@ -2891,7 +2891,7 @@ ada_value_assign (struct value *toval, struct value *fromval)
|
||||
if (!toval->deprecated_modifiable ())
|
||||
error (_("Left operand of assignment is not a modifiable lvalue."));
|
||||
|
||||
if (VALUE_LVAL (toval) == lval_memory
|
||||
if (toval->lval () == lval_memory
|
||||
&& bits > 0
|
||||
&& (type->code () == TYPE_CODE_FLT
|
||||
|| type->code () == TYPE_CODE_STRUCT))
|
||||
@ -4349,8 +4349,8 @@ ada_read_renaming_var_value (struct symbol *renaming_sym,
|
||||
static struct value *
|
||||
ensure_lval (struct value *val)
|
||||
{
|
||||
if (VALUE_LVAL (val) == not_lval
|
||||
|| VALUE_LVAL (val) == lval_internalvar)
|
||||
if (val->lval () == not_lval
|
||||
|| val->lval () == lval_internalvar)
|
||||
{
|
||||
int len = ada_check_typedef (val->type ())->length ();
|
||||
const CORE_ADDR addr =
|
||||
@ -4523,7 +4523,7 @@ ada_convert_actual (struct value *actual, struct type *formal_type0)
|
||||
result = desc_data (actual);
|
||||
else if (formal_type->code () != TYPE_CODE_PTR)
|
||||
{
|
||||
if (VALUE_LVAL (actual) != lval_memory)
|
||||
if (actual->lval () != lval_memory)
|
||||
{
|
||||
struct value *val;
|
||||
|
||||
@ -8841,7 +8841,7 @@ ada_to_fixed_value_create (struct type *type0, CORE_ADDR address,
|
||||
if (type == type0 && val0 != NULL)
|
||||
return val0;
|
||||
|
||||
if (VALUE_LVAL (val0) != lval_memory)
|
||||
if (val0->lval () != lval_memory)
|
||||
{
|
||||
/* Our value does not live in memory; it could be a convenience
|
||||
variable, for instance. Create a not_lval value using val0's
|
||||
@ -9771,12 +9771,12 @@ ada_assign_operation::evaluate (struct type *expect_type,
|
||||
In the case of assigning to a convenience variable, the lhs
|
||||
should be exactly the result of the evaluation of the rhs. */
|
||||
struct type *type = arg1->type ();
|
||||
if (VALUE_LVAL (arg1) == lval_internalvar)
|
||||
if (arg1->lval () == lval_internalvar)
|
||||
type = NULL;
|
||||
value *arg2 = std::get<1> (m_storage)->evaluate (type, exp, noside);
|
||||
if (noside == EVAL_AVOID_SIDE_EFFECTS)
|
||||
return arg1;
|
||||
if (VALUE_LVAL (arg1) == lval_internalvar)
|
||||
if (arg1->lval () == lval_internalvar)
|
||||
{
|
||||
/* Nothing. */
|
||||
}
|
||||
@ -10279,7 +10279,7 @@ ada_ternop_slice (struct expression *exp,
|
||||
convert to a pointer. */
|
||||
if (array->type ()->code () == TYPE_CODE_REF
|
||||
|| (array->type ()->code () == TYPE_CODE_ARRAY
|
||||
&& VALUE_LVAL (array) == lval_memory))
|
||||
&& array->lval () == lval_memory))
|
||||
array = value_addr (array);
|
||||
|
||||
if (noside == EVAL_AVOID_SIDE_EFFECTS
|
||||
@ -10850,7 +10850,7 @@ ada_var_msym_value_operation::evaluate_for_cast (struct type *expect_type,
|
||||
|
||||
/* Follow the Ada language semantics that do not allow taking
|
||||
an address of the result of a cast (view conversion in Ada). */
|
||||
if (VALUE_LVAL (val) == lval_memory)
|
||||
if (val->lval () == lval_memory)
|
||||
{
|
||||
if (val->lazy ())
|
||||
val->fetch_lazy ();
|
||||
@ -10872,7 +10872,7 @@ ada_var_value_operation::evaluate_for_cast (struct type *expect_type,
|
||||
|
||||
/* Follow the Ada language semantics that do not allow taking
|
||||
an address of the result of a cast (view conversion in Ada). */
|
||||
if (VALUE_LVAL (val) == lval_memory)
|
||||
if (val->lval () == lval_memory)
|
||||
{
|
||||
if (val->lazy ())
|
||||
val->fetch_lazy ();
|
||||
@ -11169,7 +11169,7 @@ ada_funcall_operation::evaluate (struct type *expect_type,
|
||||
callee = ada_to_fixed_value (coerce_ref (callee));
|
||||
}
|
||||
else if (callee->type ()->code () == TYPE_CODE_ARRAY
|
||||
&& VALUE_LVAL (callee) == lval_memory)
|
||||
&& callee->lval () == lval_memory)
|
||||
callee = value_addr (callee);
|
||||
|
||||
struct type *type = ada_check_typedef (callee->type ());
|
||||
|
Reference in New Issue
Block a user