return value_at_lazy (the_type, address);
}
-/* Helper for returning a value when handling EVAL_SKIP. */
-
-value *
-eval_skip_value (expression *exp)
-{
- return value_from_longest (builtin_type (exp->gdbarch)->builtin_int, 1);
-}
-
/* See expression.h. */
value *
enum noside noside,
struct type *type, const char *string)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
struct value *arg1 = value_aggregate_elt (type, string, expect_type,
0, noside);
if (arg1 == NULL)
eval_op_var_entry_value (struct type *expect_type, struct expression *exp,
enum noside noside, symbol *sym)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (noside == EVAL_AVOID_SIDE_EFFECTS)
return value_zero (SYMBOL_TYPE (sym), not_lval);
enum noside noside,
value *func, const char *var)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
CORE_ADDR addr = value_address (func);
const block *blk = block_for_pc (addr);
struct block_symbol sym = lookup_symbol (var, blk, VAR_DOMAIN, NULL);
eval_op_string (struct type *expect_type, struct expression *exp,
enum noside noside, int len, const char *string)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
struct type *type = language_string_char_type (exp->language_defn,
exp->gdbarch);
return value_string (string, len, type);
enum noside noside,
const char *sel)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
-
struct type *selector_type = builtin_type (exp->gdbarch)->builtin_data_ptr;
return value_from_longest (selector_type,
lookup_child_selector (exp->gdbarch, sel));
eval_op_concat (struct type *expect_type, struct expression *exp,
enum noside noside, struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (BINOP_CONCAT, arg1, arg2))
return value_x_binop (arg1, arg2, BINOP_CONCAT, OP_NULL, noside);
else
enum noside noside,
struct value *array, struct value *low, struct value *upper)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
int lowbound = value_as_long (low);
int upperbound = value_as_long (upper);
return value_slice (array, lowbound, upperbound - lowbound + 1);
enum noside noside,
struct value *arg1, const char *string)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
struct value *arg3 = value_struct_elt (&arg1, NULL, string,
NULL, "structure");
if (noside == EVAL_AVOID_SIDE_EFFECTS)
enum noside noside,
struct value *arg1, const char *string)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
-
/* Check to see if operator '->' has been overloaded. If so replace
arg1 with the value returned by evaluating operator->(). */
while (unop_user_defined_p (STRUCTOP_PTR, arg1))
{
long mem_offset;
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
-
struct value *arg3;
struct type *type = check_typedef (value_type (arg2));
switch (type->code ())
enum noside noside,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (BINOP_ADD, arg1, arg2))
return value_x_binop (arg1, arg2, BINOP_ADD, OP_NULL, noside);
else if (ptrmath_type_p (exp->language_defn, value_type (arg1))
enum noside noside,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (BINOP_SUB, arg1, arg2))
return value_x_binop (arg1, arg2, BINOP_SUB, OP_NULL, noside);
else if (ptrmath_type_p (exp->language_defn, value_type (arg1))
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
else
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
else
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
{
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
{
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
{
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
{
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
{
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
{
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
struct type *type = check_typedef (value_type (arg2));
if (type->code () != TYPE_CODE_INT
&& type->code () != TYPE_CODE_ENUM)
enum noside noside, enum exp_opcode op,
struct value *arg1)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (unop_user_defined_p (op, arg1))
return value_x_unop (arg1, op, noside);
else
enum noside noside, enum exp_opcode op,
struct value *arg1)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (unop_user_defined_p (op, arg1))
return value_x_unop (arg1, op, noside);
else
enum noside noside, enum exp_opcode op,
struct value *arg1)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (unop_user_defined_p (UNOP_COMPLEMENT, arg1))
return value_x_unop (arg1, UNOP_COMPLEMENT, noside);
else
enum noside noside, enum exp_opcode op,
struct value *arg1)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (unop_user_defined_p (op, arg1))
return value_x_unop (arg1, op, noside);
else
|| type->code () == TYPE_CODE_MEMBERPTR)
error (_("Attempt to dereference pointer "
"to member without an object"));
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (unop_user_defined_p (UNOP_IND, arg1))
return value_x_unop (arg1, UNOP_IND, noside);
else if (noside == EVAL_AVOID_SIDE_EFFECTS)
enum noside noside,
struct value *arg1, struct type *type)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (noside == EVAL_AVOID_SIDE_EFFECTS)
return value_zero (type, lval_memory);
else
enum noside noside, enum exp_opcode op,
struct value *arg1)
{
- if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS)
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
return arg1;
else if (unop_user_defined_p (op, arg1))
{
enum noside noside, enum exp_opcode op,
struct value *arg1)
{
- if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS)
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
return arg1;
else if (unop_user_defined_p (op, arg1))
{
enum noside noside, enum exp_opcode op,
struct value *arg1)
{
- if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS)
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
return arg1;
else if (unop_user_defined_p (op, arg1))
{
enum noside noside, enum exp_opcode op,
struct value *arg1)
{
- if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS)
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
return arg1;
else if (unop_user_defined_p (op, arg1))
{
eval_op_type (struct type *expect_type, struct expression *exp,
enum noside noside, struct type *type)
{
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
- else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
return allocate_value (type);
else
error (_("Attempt to use a type name as an expression"));
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2)
{
- if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS)
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
return arg1;
if (binop_user_defined_p (op, arg1, arg2))
return value_x_binop (arg1, arg2, BINOP_ASSIGN_MODIFY, op, noside);
called_method = msg_send;
}
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
if (noside == EVAL_AVOID_SIDE_EFFECTS)
{
enum noside noside, value *arg1,
gdb::array_view<value *> args)
{
- if (noside == EVAL_SKIP)
- return arg1;
for (value *arg2 : args)
{
if (binop_user_defined_p (MULTI_SUBSCRIPT, arg1, arg2))
enum noside noside)
{
value *arg1 = std::get<0> (m_storage)->evaluate (nullptr, exp, noside);
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
value *arg2 = std::get<1> (m_storage)->evaluate (nullptr, exp,
EVAL_AVOID_SIDE_EFFECTS);
enum noside noside)
{
value *arg1 = std::get<0> (m_storage)->evaluate (nullptr, exp, noside);
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
value *arg2 = std::get<1> (m_storage)->evaluate (nullptr, exp,
EVAL_AVOID_SIDE_EFFECTS);
int nargs = tem3 - tem2 + 1;
struct type *type = expect_type ? check_typedef (expect_type) : nullptr;
- if (expect_type != nullptr && noside != EVAL_SKIP
+ if (expect_type != nullptr
&& type->code () == TYPE_CODE_STRUCT)
{
struct value *rec = allocate_value (expect_type);
return evaluate_struct_tuple (rec, exp, noside, nargs);
}
- if (expect_type != nullptr && noside != EVAL_SKIP
+ if (expect_type != nullptr
&& type->code () == TYPE_CODE_ARRAY)
{
struct type *range_type = type->index_type ();
return array;
}
- if (expect_type != nullptr && noside != EVAL_SKIP
+ if (expect_type != nullptr
&& type->code () == TYPE_CODE_SET)
{
struct value *set = allocate_value (expect_type);
objects. */
argvec[tem] = in_args[tem]->evaluate_with_coercion (exp, noside);
}
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
return value_array (tem2, tem3, argvec);
}
enum noside noside)
{
value *val = evaluate (expect_type, exp, noside);
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
return value_cast (expect_type, val);
}
std::get<1> (m_storage),
std::get<0> (m_storage));
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
-
val = value_cast (to_type, val);
/* Don't allow e.g. '&(int)var_with_no_debug_info'. */
std::get<1> (m_storage),
std::get<0> (m_storage));
- if (noside == EVAL_SKIP)
- return eval_skip_value (exp);
-
val = value_cast (to_type, val);
/* Don't allow e.g. '&(int)var_with_no_debug_info'. */