GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "expression.h"
#include "target.h"
#include "frame.h"
#include "gdbthread.h"
#include "language.h"
#include "cp-abi.h"
#include "infcall.h"
#include "objc-lang.h"
#include "block.h"
#include "parser-defs.h"
#include "cp-support.h"
#include "ui-out.h"
#include "regcache.h"
#include "user-regs.h"
#include "valprint.h"
#include "gdbsupport/gdb_obstack.h"
#include "objfiles.h"
#include "typeprint.h"
#include <ctype.h>
#include "expop.h"
#include "c-exp.h"
#include "inferior.h"
Go to the source code of this file.
Classes | |
class | fake_method |
struct | fake_method::m_type |
Namespaces | |
namespace | expr |
Functions | |
CORE_ADDR | parse_and_eval_address (const char *exp) |
LONGEST | parse_and_eval_long (const char *exp) |
struct value * | parse_and_eval (const char *exp) |
struct value * | parse_to_comma_and_eval (const char **expp) |
struct value * | evaluate_expression (struct expression *exp, struct type *expect_type) |
struct value * | evaluate_type (struct expression *exp) |
void | fetch_subexp_value (struct expression *exp, expr::operation *op, struct value **valp, struct value **resultp, std::vector< value_ref_ptr > *val_chain, bool preserve_errors) |
void | unop_promote (const struct language_defn *language, struct gdbarch *gdbarch, struct value **arg1) |
void | binop_promote (const struct language_defn *language, struct gdbarch *gdbarch, struct value **arg1, struct value **arg2) |
static int | ptrmath_type_p (const struct language_defn *lang, struct type *type) |
value * | evaluate_var_value (enum noside noside, const block *blk, symbol *var) |
value * | evaluate_var_msym_value (enum noside noside, struct objfile *objfile, minimal_symbol *msymbol) |
value * | evaluate_subexp_do_call (expression *exp, enum noside noside, value *callee, gdb::array_view< value * > argvec, const char *function_name, type *default_return_type) |
static void | expr::add_struct_fields (struct type *type, completion_list &output, const char *fieldname, int namelen, const char *prefix) |
static bool | is_integral_or_integral_reference (struct type *type) |
struct value * | eval_op_scope (struct type *expect_type, struct expression *exp, enum noside noside, struct type *type, const char *string) |
struct value * | eval_op_var_entry_value (struct type *expect_type, struct expression *exp, enum noside noside, symbol *sym) |
struct value * | eval_op_var_msym_value (struct type *expect_type, struct expression *exp, enum noside noside, bool outermost_p, bound_minimal_symbol msymbol) |
struct value * | eval_op_func_static_var (struct type *expect_type, struct expression *exp, enum noside noside, value *func, const char *var) |
struct value * | eval_op_register (struct type *expect_type, struct expression *exp, enum noside noside, const char *name) |
struct value * | eval_op_objc_selector (struct type *expect_type, struct expression *exp, enum noside noside, const char *sel) |
struct value * | eval_op_ternop (struct type *expect_type, struct expression *exp, enum noside noside, struct value *array, struct value *low, struct value *upper) |
struct value * | eval_op_structop_struct (struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, const char *string) |
struct value * | eval_op_structop_ptr (struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, const char *string) |
struct value * | eval_op_member (struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, struct value *arg2) |
struct value * | eval_op_add (struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, struct value *arg2) |
struct value * | eval_op_sub (struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, struct value *arg2) |
struct value * | eval_op_binary (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
struct value * | eval_op_subscript (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
struct value * | eval_op_equal (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
struct value * | eval_op_notequal (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
struct value * | eval_op_less (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
struct value * | eval_op_gtr (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
struct value * | eval_op_geq (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
struct value * | eval_op_leq (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
struct value * | eval_op_repeat (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
struct value * | eval_op_plus (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_neg (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_complement (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_lognot (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_ind (struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1) |
struct value * | eval_op_alignof (struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1) |
struct value * | eval_op_memval (struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, struct type *type) |
struct value * | eval_op_preinc (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_predec (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_postinc (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_postdec (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1) |
struct value * | eval_op_type (struct type *expect_type, struct expression *exp, enum noside noside, struct type *type) |
struct value * | eval_binop_assign_modify (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) |
static struct value * | eval_op_objc_msgcall (struct type *expect_type, struct expression *exp, enum noside noside, CORE_ADDR selector, value *target, gdb::array_view< value * > args) |
static struct value * | eval_multi_subscript (struct type *expect_type, struct expression *exp, enum noside noside, value *arg1, gdb::array_view< value * > args) |
static value * | evaluate_subexp_for_address_base (struct expression *exp, enum noside noside, value *x) |
static value * | evaluate_subexp_for_sizeof_base (struct expression *exp, struct type *type) |
struct type * | parse_and_eval_type (const char *p, int length) |
void binop_promote | ( | const struct language_defn * | language, |
struct gdbarch * | gdbarch, | ||
struct value ** | arg1, | ||
struct value ** | arg2 | ||
) |
Definition at line 262 of file eval.c.
References builtin_type::builtin_double, builtin_type::builtin_int, builtin_type::builtin_long, builtin_type::builtin_long_double, builtin_type::builtin_long_long, builtin_type::builtin_unsigned_int, builtin_type::builtin_unsigned_long, builtin_type::builtin_unsigned_long_long, check_typedef(), type::code(), coerce_ref(), gdbarch_double_bit(), gdbarch_long_bit(), is_fixed_point_type(), is_integral_type(), type::is_unsigned(), language_asm, language_c, language_cplus, language_objc, language_opencl, type::length(), lookup_signed_typename(), lookup_unsigned_typename(), value_cast(), and value_type().
Referenced by ada_binop_exp(), ada_binop_in_bounds(), ada_binop_minmax(), ada_equal_binop(), ada_mult_binop(), ada_unop_in_range(), eval_binop_assign_modify(), eval_op_add(), eval_op_binary(), eval_op_equal(), eval_op_geq(), eval_op_gtr(), eval_op_leq(), eval_op_less(), eval_op_notequal(), eval_op_postdec(), eval_op_postinc(), eval_op_predec(), eval_op_preinc(), eval_op_sub(), eval_ternop_in_range(), and expr::ada_binop_addsub_operation::evaluate().
struct value * eval_binop_assign_modify | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1880 of file eval.c.
References binop_promote(), binop_user_defined_p(), EVAL_AVOID_SIDE_EFFECTS, expression::gdbarch, is_integral_type(), expression::language_defn, ptrmath_type_p(), unop_promote(), value_as_long(), value_assign(), value_binop(), value_ptradd(), value_type(), and value_x_binop().
Referenced by expr::assign_modify_operation::evaluate().
|
static |
Definition at line 2185 of file eval.c.
References binop_user_defined_p(), check_typedef(), type::code(), coerce_ref(), type::name(), value_as_long(), value_subscript(), value_type(), and value_x_binop().
Referenced by expr::multi_subscript_operation::evaluate().
struct value * eval_op_add | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1321 of file eval.c.
References binop_promote(), binop_user_defined_p(), expression::gdbarch, is_integral_or_integral_reference(), expression::language_defn, ptrmath_type_p(), value_as_long(), value_binop(), value_ptradd(), value_type(), and value_x_binop().
Referenced by expr::add_operation::evaluate().
struct value * eval_op_alignof | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct value * | arg1 | ||
) |
Definition at line 1709 of file eval.c.
References builtin_type::builtin_int, expression::gdbarch, type_align(), value_from_longest(), and value_type().
Referenced by expr::unop_alignof_operation::evaluate().
struct value * eval_op_binary | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1369 of file eval.c.
References binop_promote(), binop_user_defined_p(), EVAL_AVOID_SIDE_EFFECTS, expression::gdbarch, is_integral_type(), expression::language_defn, unop_promote(), value_binop(), value_logical_not(), value_one(), value_type(), and value_x_binop().
Referenced by expr::ada_bitwise_operation< OP >::evaluate().
struct value * eval_op_complement | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1626 of file eval.c.
References expression::gdbarch, expression::language_defn, unop_promote(), unop_user_defined_p(), value_complement(), and value_x_unop().
struct value * eval_op_equal | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1448 of file eval.c.
References binop_promote(), binop_user_defined_p(), expression::gdbarch, language_bool_type(), expression::language_defn, value_equal(), value_from_longest(), and value_x_binop().
struct value * eval_op_func_static_var | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
value * | func, | ||
const char * | var | ||
) |
Definition at line 1126 of file eval.c.
References block_symbol::block, block_for_pc(), evaluate_var_value(), func, lookup_symbol(), block_symbol::symbol, value_address(), and VAR_DOMAIN.
Referenced by expr::func_static_var_operation::evaluate().
struct value * eval_op_geq | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1532 of file eval.c.
References binop_promote(), binop_user_defined_p(), expression::gdbarch, language_bool_type(), expression::language_defn, value_equal(), value_from_longest(), value_less(), and value_x_binop().
struct value * eval_op_gtr | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1511 of file eval.c.
References binop_promote(), binop_user_defined_p(), expression::gdbarch, language_bool_type(), expression::language_defn, value_from_longest(), value_less(), and value_x_binop().
struct value * eval_op_ind | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct value * | arg1 | ||
) |
Definition at line 1659 of file eval.c.
References builtin_type::builtin_int, check_typedef(), type::code(), EVAL_AVOID_SIDE_EFFECTS, expression::gdbarch, is_dynamic_type(), type::is_pointer_or_reference(), lval_memory, type::target_type(), unop_user_defined_p(), value_as_address(), value_at_lazy(), value_ind(), value_type(), value_x_unop(), and value_zero().
Referenced by expr::unop_ind_base_operation::evaluate().
struct value * eval_op_leq | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1553 of file eval.c.
References binop_promote(), binop_user_defined_p(), expression::gdbarch, language_bool_type(), expression::language_defn, value_equal(), value_from_longest(), value_less(), and value_x_binop().
struct value * eval_op_less | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1490 of file eval.c.
References binop_promote(), binop_user_defined_p(), expression::gdbarch, language_bool_type(), expression::language_defn, value_from_longest(), value_less(), and value_x_binop().
struct value * eval_op_lognot | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1642 of file eval.c.
References expression::gdbarch, language_bool_type(), expression::language_defn, unop_user_defined_p(), value_from_longest(), value_logical_not(), and value_x_unop().
struct value * eval_op_member | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1281 of file eval.c.
References check_typedef(), code, type::code(), cplus_method_ptr_to_value(), EVAL_AVOID_SIDE_EFFECTS, lookup_pointer_type(), not_lval, type::target_type(), TYPE_SELF_TYPE, value_as_long(), value_cast_pointers(), value_from_pointer(), value_ind(), value_type(), and value_zero().
Referenced by expr::structop_member_operation::evaluate(), and expr::structop_mptr_operation::evaluate().
struct value * eval_op_memval | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct value * | arg1, | ||
struct type * | type | ||
) |
Definition at line 1725 of file eval.c.
References EVAL_AVOID_SIDE_EFFECTS, lval_memory, value_as_address(), value_at_lazy(), and value_zero().
Referenced by expr::unop_memval_operation::evaluate(), and expr::unop_memval_type_operation::evaluate().
struct value * eval_op_neg | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1610 of file eval.c.
References expression::gdbarch, expression::language_defn, unop_promote(), unop_user_defined_p(), value_neg(), and value_x_unop().
struct value * eval_op_notequal | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1469 of file eval.c.
References binop_promote(), binop_user_defined_p(), expression::gdbarch, language_bool_type(), expression::language_defn, value_equal(), value_from_longest(), and value_x_binop().
|
static |
Definition at line 1916 of file eval.c.
References allocate_value(), block_for_pc(), builtin_type::builtin_data_ptr, builtin_type::builtin_long, call_function_by_hand(), check_typedef(), code, type::code(), current_inferior(), deprecated_set_value_type(), EVAL_AVOID_SIDE_EFFECTS, find_function_addr(), find_function_in_inferior(), find_pc_function(), expression::gdbarch, gdbarch_convert_from_func_ptr_addr(), lookup_child_selector(), lookup_function_type(), lookup_minimal_symbol(), lookup_pointer_type(), selector, type::target_type(), using_struct_return(), value_as_address(), value_as_long(), value_from_longest(), value_from_pointer(), value_of_variable(), and value_type().
Referenced by expr::objc_msgcall_operation::evaluate().
struct value * eval_op_objc_selector | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
const char * | sel | ||
) |
Definition at line 1187 of file eval.c.
References builtin_type::builtin_data_ptr, expression::gdbarch, lookup_child_selector(), and value_from_longest().
Referenced by expr::objc_selector_operation::evaluate().
struct value * eval_op_plus | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1594 of file eval.c.
References expression::gdbarch, expression::language_defn, unop_promote(), unop_user_defined_p(), value_pos(), and value_x_unop().
struct value * eval_op_postdec | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1834 of file eval.c.
References binop_promote(), EVAL_AVOID_SIDE_EFFECTS, expression::gdbarch, expression::language_defn, ptrmath_type_p(), unop_user_defined_p(), value_assign(), value_binop(), value_non_lval(), value_one(), value_ptradd(), value_type(), and value_x_unop().
struct value * eval_op_postinc | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1800 of file eval.c.
References binop_promote(), EVAL_AVOID_SIDE_EFFECTS, expression::gdbarch, expression::language_defn, ptrmath_type_p(), unop_user_defined_p(), value_assign(), value_binop(), value_non_lval(), value_one(), value_ptradd(), value_type(), and value_x_unop().
struct value * eval_op_predec | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1769 of file eval.c.
References binop_promote(), EVAL_AVOID_SIDE_EFFECTS, expression::gdbarch, expression::language_defn, ptrmath_type_p(), unop_user_defined_p(), value_assign(), value_binop(), value_one(), value_ptradd(), value_type(), and value_x_unop().
struct value * eval_op_preinc | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1 | ||
) |
Definition at line 1738 of file eval.c.
References binop_promote(), EVAL_AVOID_SIDE_EFFECTS, expression::gdbarch, expression::language_defn, ptrmath_type_p(), unop_user_defined_p(), value_assign(), value_binop(), value_one(), value_ptradd(), value_type(), and value_x_unop().
struct value * eval_op_register | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
const char * | name | ||
) |
Definition at line 1141 of file eval.c.
References EVAL_AVOID_SIDE_EFFECTS, expression::gdbarch, gdbarch_num_cooked_regs(), get_selected_frame(), name, not_lval, register_type(), user_reg_map_name_to_regnum(), value_of_register(), and value_zero().
Referenced by expr::register_operation::evaluate().
struct value * eval_op_repeat | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1574 of file eval.c.
References allocate_repeat_value(), check_typedef(), type::code(), EVAL_AVOID_SIDE_EFFECTS, longest_to_int(), value_as_long(), value_repeat(), and value_type().
struct value * eval_op_scope | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct type * | type, | ||
const char * | string | ||
) |
Definition at line 1077 of file eval.c.
References value_aggregate_elt().
Referenced by expr::scope_operation::evaluate().
struct value * eval_op_structop_ptr | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct value * | arg1, | ||
const char * | string | ||
) |
Definition at line 1225 of file eval.c.
References type::code(), EVAL_AVOID_SIDE_EFFECTS, get_user_print_options(), type::target_type(), unop_user_defined_p(), value_cast(), VALUE_LVAL, value_rtti_indirect_type(), value_struct_elt(), value_type(), value_x_unop(), and value_zero().
Referenced by expr::structop_ptr_operation::evaluate().
struct value * eval_op_structop_struct | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct value * | arg1, | ||
const char * | string | ||
) |
Definition at line 1211 of file eval.c.
References EVAL_AVOID_SIDE_EFFECTS, VALUE_LVAL, value_struct_elt(), value_type(), and value_zero().
Referenced by expr::structop_operation::evaluate().
struct value * eval_op_sub | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1343 of file eval.c.
References binop_promote(), binop_user_defined_p(), builtin_type::builtin_long, expression::gdbarch, is_integral_or_integral_reference(), expression::language_defn, ptrmath_type_p(), value_as_long(), value_binop(), value_from_longest(), value_ptradd(), value_ptrdiff(), value_type(), and value_x_binop().
Referenced by expr::sub_operation::evaluate().
struct value * eval_op_subscript | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
enum exp_opcode | op, | ||
struct value * | arg1, | ||
struct value * | arg2 | ||
) |
Definition at line 1414 of file eval.c.
References binop_user_defined_p(), check_typedef(), type::code(), coerce_ref(), EVAL_AVOID_SIDE_EFFECTS, type::name(), type::target_type(), value_as_long(), VALUE_LVAL, value_subscript(), value_type(), value_x_binop(), and value_zero().
struct value * eval_op_ternop | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct value * | array, | ||
struct value * | low, | ||
struct value * | upper | ||
) |
Definition at line 1199 of file eval.c.
References value_as_long(), and value_slice().
Referenced by expr::ternop_slice_operation::evaluate().
struct value * eval_op_type | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
struct type * | type | ||
) |
Definition at line 1868 of file eval.c.
References allocate_value(), and EVAL_AVOID_SIDE_EFFECTS.
Referenced by expr::type_operation::evaluate().
struct value * eval_op_var_entry_value | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
symbol * | sym | ||
) |
Definition at line 1091 of file eval.c.
References EVAL_AVOID_SIDE_EFFECTS, get_selected_frame(), not_lval, general_symbol_info::print_name(), SYMBOL_COMPUTED_OPS, symbol::type(), and value_zero().
Referenced by expr::var_entry_value_operation::evaluate().
struct value * eval_op_var_msym_value | ( | struct type * | expect_type, |
struct expression * | exp, | ||
enum noside noside noside | , | ||
bool | outermost_p, | ||
bound_minimal_symbol | msymbol | ||
) |
Definition at line 1109 of file eval.c.
References type::code(), error_unknown_type(), EVAL_AVOID_SIDE_EFFECTS, evaluate_var_msym_value(), bound_minimal_symbol::minsym, bound_minimal_symbol::objfile, general_symbol_info::print_name(), and value_type().
Referenced by expr::var_msym_value_operation::evaluate().
struct value * evaluate_expression | ( | struct expression * | exp, |
struct type * | expect_type | ||
) |
Definition at line 113 of file eval.c.
References EVAL_NORMAL, and expression::evaluate().
Referenced by ada_read_renaming_var_value(), breakpoint_cond_eval(), check_thread_db_callback(), do_one_display(), dump_arc_instruction_command(), encode_actions_1(), dtrace_probe::evaluate_argument(), stap_probe::evaluate_argument(), execute_control_command_1(), info_mach_region_command(), init_if_undefined_command(), mi_cmd_data_evaluate_expression(), output_command(), parse_and_eval(), parse_and_eval_address(), parse_and_eval_long(), parse_to_comma_and_eval(), print_object_command(), print_variable_or_computed(), process_print_command_args(), return_command(), set_command(), should_stop_exception(), value_of_root_1(), varobj_create(), varobj_set_value(), and x_command().
value * evaluate_subexp_do_call | ( | expression * | exp, |
enum noside noside noside | , | ||
value * | callee, | ||
gdb::array_view< value * > | argvec, | ||
const char * | function_name, | ||
type * | default_return_type | ||
) |
Definition at line 608 of file eval.c.
References allocate_value(), builtin_type::builtin_int, call_function_by_hand(), call_internal_function(), call_xmethod(), code, type::code(), error_call_unknown_return_type(), EVAL_AVOID_SIDE_EFFECTS, find_gnu_ifunc_target_type(), expression::gdbarch, type::is_gnu_ifunc(), expression::language_defn, not_lval, result_type_of_xmethod(), type::target_type(), value_address(), value_type(), and value_zero().
Referenced by expr::adl_func_operation::evaluate(), expr::fortran_undetermined::evaluate(), expr::operation::evaluate_funcall(), expr::scope_operation::evaluate_funcall(), expr::var_value_operation::evaluate_funcall(), expr::structop_base_operation::evaluate_funcall(), and expr::structop_member_base::evaluate_funcall().
|
static |
Definition at line 2572 of file eval.c.
References check_typedef(), EVAL_AVOID_SIDE_EFFECTS, lookup_pointer_type(), lval_memory, not_lval, type::target_type(), TYPE_IS_REFERENCE, value_addr(), VALUE_LVAL, value_must_coerce_to_target(), value_type(), and value_zero().
Referenced by expr::operation::evaluate_for_address(), and expr::unop_ind_base_operation::evaluate_for_address().
|
static |
Definition at line 2722 of file eval.c.
References builtin_type::builtin_int, check_typedef(), expression::gdbarch, language_defn::la_language, language_cplus, expression::language_defn, type::length(), type::target_type(), TYPE_IS_REFERENCE, and value_from_longest().
Referenced by expr::operation::evaluate_for_sizeof(), expr::var_value_operation::evaluate_for_sizeof(), expr::unop_memval_operation::evaluate_for_sizeof(), and expr::unop_memval_type_operation::evaluate_for_sizeof().
struct value * evaluate_type | ( | struct expression * | exp | ) |
Definition at line 122 of file eval.c.
References EVAL_AVOID_SIDE_EFFECTS, and expression::evaluate().
Referenced by dtrace_process_dof_probe(), gnuv3_get_type_from_type_info(), maintenance_print_type(), print_variable_or_computed(), varobj_create(), and whatis_exp().
value * evaluate_var_msym_value | ( | enum noside noside noside | , |
struct objfile * | objfile, | ||
minimal_symbol * | msymbol | ||
) |
Definition at line 593 of file eval.c.
References EVAL_AVOID_SIDE_EFFECTS, find_minsym_type_and_address(), type::is_gnu_ifunc(), not_lval, value_at_lazy(), and value_zero().
Referenced by eval_op_var_msym_value(), expr::var_msym_value_operation::evaluate_for_address(), expr::ada_var_msym_value_operation::evaluate_for_cast(), expr::var_msym_value_operation::evaluate_for_cast(), and expr::var_msym_value_operation::evaluate_for_sizeof().
Definition at line 544 of file eval.c.
References EVAL_AVOID_SIDE_EFFECTS, not_lval, symbol::type(), value_of_variable(), and value_zero().
Referenced by eval_op_func_static_var(), expr::var_value_operation::evaluate(), expr::adl_func_operation::evaluate(), expr::ada_var_value_operation::evaluate_for_cast(), expr::var_value_operation::evaluate_for_cast(), and expr::var_value_operation::evaluate_funcall().
void fetch_subexp_value | ( | struct expression * | exp, |
expr::operation * | op, | ||
struct value ** | valp, | ||
struct value ** | resultp, | ||
std::vector< value_ref_ptr > * | val_chain, | ||
bool | preserve_errors | ||
) |
Definition at line 150 of file eval.c.
References EVAL_NORMAL, expr::operation::evaluate(), value_fetch_lazy(), value_lazy(), value_mark(), and value_release_to_mark().
Referenced by ppc_linux_nat_target::check_condition(), update_watchpoint(), watch_command_1(), and watchpoint_check().
|
static |
Definition at line 1063 of file eval.c.
References check_typedef(), is_integral_type(), type::target_type(), and TYPE_IS_REFERENCE.
Referenced by eval_op_add(), and eval_op_sub().
struct value * parse_and_eval | ( | const char * | exp | ) |
Definition at line 70 of file eval.c.
References evaluate_expression(), and parse_expression().
Referenced by ada_exception_message_1(), frame_command_helper< FPTR >::address(), dump_value_to_file(), gdbpy_parse_and_eval(), gdbscm_parse_and_eval(), ignore_command(), info_task(), info_vtbl_command(), frame_command_helper< FPTR >::level(), maintenance_print_frame_id(), mi_cmd_thread_select(), mi_cmd_trace_define_variable(), parse_frame_specification(), print_ada_task_info(), quit_command(), should_stop_exception(), task_command_1(), trace_variable_command(), and frame_command_helper< FPTR >::view().
CORE_ADDR parse_and_eval_address | ( | const char * | exp | ) |
Definition at line 52 of file eval.c.
References evaluate_expression(), parse_expression(), and value_as_address().
Referenced by ada_exception_name_addr_1(), ada_unhandled_exception_name_addr(), ada_unhandled_exception_name_addr_from_raise(), add_symbol_file_command(), add_symbol_file_from_memory_command(), adi_assign_command(), adi_examine_command(), bsd_kvm_pcb_cmd(), bsd_kvm_proc_cmd(), disassemble_command(), dump_memory_to_file(), go32_pte_for_address(), i386_mpx_info_bounds(), info_symbol_command(), maintenance_print_psymbols(), maintenance_print_symbols(), maintenance_translate_address(), mem_command(), mi_cmd_data_read_memory(), mi_cmd_data_read_memory_bytes(), mi_cmd_data_write_memory(), mi_cmd_data_write_memory_bytes(), mi_cmd_data_write_register_values(), mi_cmd_disassemble(), mi_cmd_trace_find(), remove_symbol_file_command(), restore_command(), set_section_command(), set_task_exc_port_cmd(), set_thread_exc_port_cmd(), symbol_file_command(), tfind_outside_command(), tfind_pc_command(), tfind_range_command(), and unwind_command().
LONGEST parse_and_eval_long | ( | const char * | exp | ) |
Definition at line 62 of file eval.c.
References evaluate_expression(), parse_expression(), and value_as_long().
Referenced by aarch64_linux_report_signal_info(), add_inferior_command(), adi_assign_command(), backtrace_command_1(), breakpoint_1(), call_lseek(), clone_inferior_command(), continue_command(), delete_checkpoint_command(), detach_checkpoint_command(), display_selectors(), do_set_command(), down_silently_base(), fbsd_report_signal_info(), go32_pde(), go32_pte(), go32_sgdt(), go32_sidt(), go32_sldt(), i386_linux_report_signal_info(), inferior_command(), info_checkpoints_command(), info_signals_command(), maintenance_info_program_spaces_command(), parse_cli_var_uinteger(), parse_cli_var_zuinteger_unlimited(), queue_signal_command(), record_goto(), restart_command(), restore_command(), set_radix(), show_commands(), show_values(), signal_command(), sparc64_linux_report_signal_info(), step_1(), tfind_command_1(), tfind_tracepoint_command(), and up_silently_base().
struct type * parse_and_eval_type | ( | const char * | p, |
int | length | ||
) |
Definition at line 2902 of file eval.c.
References expr::unop_cast_operation::get_type(), type::length(), and parse_expression().
Referenced by safe_parse_type().
struct value * parse_to_comma_and_eval | ( | const char ** | expp | ) |
Definition at line 82 of file eval.c.
References evaluate_expression(), and parse_exp_1().
Referenced by disassemble_command(), i386_mpx_set_bounds(), info_port_rights(), linespec_expression_to_pc(), parse_find_args(), ui_printf(), and watch_command_1().
|
static |
Definition at line 438 of file eval.c.
References language_defn::c_style_arrays_p(), check_typedef(), type::code(), type::is_vector(), type::target_type(), and TYPE_IS_REFERENCE.
Referenced by eval_binop_assign_modify(), eval_op_add(), eval_op_postdec(), eval_op_postinc(), eval_op_predec(), eval_op_preinc(), and eval_op_sub().
void unop_promote | ( | const struct language_defn * | language, |
struct gdbarch * | gdbarch, | ||
struct value ** | arg1 | ||
) |
Definition at line 229 of file eval.c.
References builtin_type::builtin_int, check_typedef(), coerce_ref(), is_integral_type(), type::length(), value_cast(), and value_type().
Referenced by ada_abs(), ada_binop_exp(), ada_unop_neg(), eval_binop_assign_modify(), eval_op_binary(), eval_op_complement(), eval_op_neg(), and eval_op_plus().