GDB (xrefs)
|
#include "defs.h"
#include "value.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "target.h"
#include "language.h"
#include "target-float.h"
#include "infcall.h"
#include "gdbsupport/byte-vector.h"
#include "gdbarch.h"
#include "rust-lang.h"
#include "ada-lang.h"
Go to the source code of this file.
Functions | |
static struct value * | value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound) |
static LONGEST | find_size_for_pointer_math (struct type *ptr_type) |
struct value * | value_ptradd (struct value *arg1, LONGEST arg2) |
LONGEST | value_ptrdiff (struct value *arg1, struct value *arg2) |
struct value * | value_subscript (struct value *array, LONGEST index) |
struct value * | value_to_array (struct value *val) |
int | binop_types_user_defined_p (enum exp_opcode op, struct type *type1, struct type *type2) |
int | binop_user_defined_p (enum exp_opcode op, struct value *arg1, struct value *arg2) |
int | unop_user_defined_p (enum exp_opcode op, struct value *arg1) |
static struct value * | value_user_defined_cpp_op (gdb::array_view< value * > args, char *oper, int *static_memfuncp, enum noside noside) |
static struct value * | value_user_defined_op (struct value **argp, gdb::array_view< value * > args, char *name, int *static_memfuncp, enum noside noside) |
struct value * | value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op, enum exp_opcode otherop, enum noside noside) |
struct value * | value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside) |
struct value * | value_concat (struct value *arg1, struct value *arg2) |
static void | value_args_as_target_float (struct value *arg1, struct value *arg2, gdb_byte *x, struct type **eff_type_x, gdb_byte *y, struct type **eff_type_y) |
static struct value * | fixed_point_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) |
static struct type * | promotion_type (struct type *type1, struct type *type2) |
static struct value * | scalar_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) |
static struct value * | complex_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) |
static int | type_length_bits (type *type) |
static bool | check_valid_shift_count (enum exp_opcode op, type *result_type, type *shift_count_type, const gdb_mpz &shift_count, unsigned long &nbits) |
struct value * | value_vector_widen (struct value *scalar_value, struct type *vector_type) |
static struct value * | vector_binop (struct value *val1, struct value *val2, enum exp_opcode op) |
struct value * | value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) |
bool | value_logical_not (struct value *arg1) |
static int | value_strcmp (struct value *arg1, struct value *arg2) |
int | value_equal (struct value *arg1, struct value *arg2) |
int | value_equal_contents (struct value *arg1, struct value *arg2) |
int | value_less (struct value *arg1, struct value *arg2) |
struct value * | value_pos (struct value *arg1) |
struct value * | value_neg (struct value *arg1) |
struct value * | value_complement (struct value *arg1) |
int | value_bit_index (struct type *type, const gdb_byte *valaddr, int index) |
int binop_types_user_defined_p | ( | enum exp_opcode | op, |
struct type * | type1, | ||
struct type * | type2 ) |
Definition at line 279 of file valarith.c.
References check_typedef(), type::code(), type::target_type(), and TYPE_IS_REFERENCE.
Referenced by binop_user_defined_p(), and gen_expr_binop_rest().
int binop_user_defined_p | ( | enum exp_opcode | op, |
struct value * | arg1, | ||
struct value * | arg2 ) |
Definition at line 304 of file valarith.c.
References binop_types_user_defined_p(), and value::type().
Referenced by eval_binop_assign_modify(), eval_multi_subscript(), 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_sub(), eval_op_subscript(), expr::logical_and_operation::evaluate(), expr::logical_or_operation::evaluate(), and valpy_binop_throw().
|
static |
Definition at line 1087 of file valarith.c.
References gdb_mpz::as_integer(), current_language, type::is_unsigned(), language_defn::la_language, language_go, and type_length_bits().
Referenced by scalar_binop().
|
static |
Definition at line 959 of file valarith.c.
References can_create_complex_type(), check_typedef(), type::code(), init_complex_type(), not_lval, promotion_type(), scalar_binop(), value::type(), value_as_long(), value_cast(), value_complement(), value_from_longest(), value_imaginary_part(), value_literal_complex(), value_real_part(), and value::zero().
Referenced by scalar_binop().
|
static |
Definition at line 46 of file valarith.c.
References check_typedef(), type::code(), name, type::name(), type::target_type(), and type_length_units().
Referenced by value_ptradd().
|
static |
Definition at line 809 of file valarith.c.
References value::allocate(), type::arch(), check_typedef(), value::contents(), value::contents_raw(), current_language, type::fixed_point_scaling_factor(), is_fixed_point_type(), type::is_unsigned(), language_bool_type(), gdb_mpq::read_fixed_point(), value::type(), type_byte_order(), value_cast(), value_from_ulongest(), and value_to_gdb_mpq().
Referenced by scalar_binop().
Definition at line 918 of file valarith.c.
References is_floating_type(), type::is_unsigned(), and type::length().
Referenced by complex_binop(), and scalar_binop().
|
static |
Definition at line 1141 of file valarith.c.
References value::allocate(), check_typedef(), check_valid_shift_count(), type::code(), coerce_ref(), complex_binop(), value::contents_raw(), fixed_point_binop(), is_fixed_point_type(), is_floating_type(), is_floating_value(), is_integral_type(), type::length(), gdb_mpz::pow(), promotion_type(), store_signed_integer(), target_float_binop(), value::type(), type_byte_order(), value_args_as_target_float(), value_as_long(), value_as_mpz(), and value_from_mpz().
Referenced by complex_binop(), and value_binop().
|
static |
Definition at line 1071 of file valarith.c.
References type::arch(), gdbarch_addressable_memory_unit_size(), and type::length().
Referenced by check_valid_shift_count().
int unop_user_defined_p | ( | enum exp_opcode | op, |
struct value * | arg1 ) |
Definition at line 317 of file valarith.c.
References check_typedef(), type::code(), type::target_type(), value::type(), and TYPE_IS_REFERENCE.
Referenced by eval_op_complement(), eval_op_ind(), eval_op_lognot(), eval_op_neg(), eval_op_plus(), eval_op_postdec(), eval_op_postinc(), eval_op_predec(), eval_op_preinc(), eval_op_structop_ptr(), expr::unop_ind_base_operation::evaluate_for_address(), and expr::structop_base_operation::evaluate_funcall().
|
static |
Definition at line 745 of file valarith.c.
References check_typedef(), type::code(), value::contents(), is_floating_type(), is_integral_type(), type::is_unsigned(), type::length(), type::name(), target_float_from_longest(), target_float_from_ulongest(), value::type(), and value_as_long().
Referenced by scalar_binop(), value_equal(), and value_less().
struct value * value_binop | ( | struct value * | arg1, |
struct value * | arg2, | ||
enum exp_opcode | op ) |
Definition at line 1464 of file valarith.c.
References check_typedef(), type::code(), is_integral_type(), type::is_vector(), scalar_binop(), value::type(), value_vector_widen(), and vector_binop().
Referenced by ada_binop_exp(), ada_binop_minmax(), ada_value_binop(), eval_binop_assign_modify(), eval_op_add(), eval_op_binary(), eval_op_postdec(), eval_op_postinc(), eval_op_predec(), eval_op_preinc(), eval_op_sub(), expr::ada_binop_addsub_operation::evaluate(), dwarf_expr_context::execute_stack_op(), valpy_binop_throw(), value_equal(), value_less(), value_neg(), vector_binop(), and vlscm_binop_gdbthrow().
int value_bit_index | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | index ) |
Definition at line 1825 of file valarith.c.
References type::arch(), extract_unsigned_integer(), gdbarch_byte_order(), get_discrete_bounds(), type::index_type(), and type_byte_order().
Referenced by m2_print_long_set(), m2_language::value_print_inner(), and pascal_language::value_print_inner().
Definition at line 1770 of file valarith.c.
References value::allocate(), check_typedef(), type::code(), coerce_ref(), gdb_mpz::complement(), value::contents_all(), value::contents_writeable(), get_array_bounds(), is_integral_type(), type::is_vector(), type::length(), type::target_type(), type, value::type(), value_as_mpz(), value_complement(), value_from_mpz(), value_imaginary_part(), value_literal_complex(), value_neg(), value_real_part(), and value_subscript().
Referenced by complex_binop(), eval_op_complement(), eval_op_rust_complement(), dwarf_expr_context::execute_stack_op(), valpy_invert(), value_complement(), and vlscm_unop_gdbthrow().
Definition at line 684 of file valarith.c.
References value::allocate(), language_defn::c_style_arrays_p(), check_typedef(), type::code(), value::contents(), value::contents_raw(), current_language, get_array_bounds(), lookup_array_range_type(), type::target_type(), value::type(), and types_equal().
Referenced by expr::ada_concat_operation::evaluate(), and expr::concat_operation::evaluate().
Definition at line 1559 of file valarith.c.
References check_typedef(), type::code(), coerce_array(), value::contents(), is_floating_value(), is_integral_type(), type::length(), target_float_compare(), value::type(), value_args_as_target_float(), value_as_address(), value_as_long(), value_binop(), value_strcmp(), and value_true().
Referenced by ada_binop_in_bounds(), ada_unop_in_range(), ada_value_equal(), eval_op_equal(), eval_op_geq(), eval_op_leq(), eval_op_notequal(), eval_ternop_in_range(), dwarf_expr_context::execute_stack_op(), gdbscm_value_to_real(), scalar_relop(), valpy_richcompare_throw(), value_vector_widen(), vlscm_equal_p_value_smob(), and vlscm_rich_compare().
Definition at line 1630 of file valarith.c.
References check_typedef(), type::code(), value::contents(), type::length(), and value::type().
Referenced by watchpoint_check().
Definition at line 1648 of file valarith.c.
References check_typedef(), type::code(), coerce_array(), is_fixed_point_type(), is_floating_value(), is_integral_type(), type::length(), target_float_compare(), value::type(), value_args_as_target_float(), value_as_address(), value_as_long(), value_binop(), value_strcmp(), and value_true().
Referenced by ada_abs(), ada_binop_in_bounds(), ada_unop_in_range(), eval_op_geq(), eval_op_gtr(), eval_op_leq(), eval_op_less(), eval_ternop_in_range(), dwarf_expr_context::execute_stack_op(), scalar_relop(), valpy_absolute(), valpy_richcompare_throw(), vlscm_rich_compare(), and vlscm_unop_gdbthrow().
bool value_logical_not | ( | struct value * | arg1 | ) |
Definition at line 1501 of file valarith.c.
References check_typedef(), coerce_array(), value::contents(), is_floating_value(), type::length(), target_float_is_zero(), and value::type().
Referenced by eval_op_binary(), eval_op_lognot(), eval_op_rust_complement(), expr::opencl_logical_binop_operation::evaluate(), expr::opencl_ternop_cond_operation::evaluate(), expr::ternop_cond_operation::evaluate(), expr::logical_and_operation::evaluate(), expr::logical_or_operation::evaluate(), opencl_logical_not(), scalar_relop(), value_allocate_space_in_inferior(), value_cast_pointers(), value_true(), and vlscm_unop_gdbthrow().
Definition at line 1722 of file valarith.c.
References value::allocate(), check_typedef(), type::code(), coerce_ref(), value::contents_all(), value::contents_writeable(), get_array_bounds(), is_fixed_point_type(), is_floating_type(), is_integral_type(), type::is_vector(), type::length(), not_lval, type::target_type(), type, value::type(), value_binop(), value_from_longest(), value_imaginary_part(), value_literal_complex(), value_neg(), value_real_part(), value_subscript(), and value::zero().
Referenced by ada_abs(), ada_unop_neg(), eval_op_neg(), dwarf_expr_context::execute_stack_op(), valpy_negative(), value_complement(), value_neg(), and vlscm_unop_gdbthrow().
Definition at line 1704 of file valarith.c.
References check_typedef(), type::code(), coerce_ref(), value::contents(), is_floating_value(), is_integral_type(), type::is_vector(), type, value::type(), and value_from_contents().
Referenced by eval_op_plus().
Definition at line 79 of file valarith.c.
References check_typedef(), coerce_array(), find_size_for_pointer_math(), value::lval(), lval_internalvar, value::set_component_location(), value::type(), value_as_address(), and value_from_pointer().
Referenced by ada_get_tsd_from_tag(), ada_tag_value_at_base_address(), ada_value_ptr_subscript(), eval_binop_assign_modify(), eval_op_add(), eval_op_m2_subscript(), eval_op_postdec(), eval_op_postinc(), eval_op_predec(), eval_op_preinc(), eval_op_sub(), ravenscar_thread_target::get_fpu_state(), gnuv2_virtual_fn_field(), gnuv3_method_ptr_to_value(), valpy_binop_throw(), value_subscript(), and vlscm_binop_gdbthrow().
Definition at line 100 of file valarith.c.
References check_typedef(), type::code(), coerce_array(), type::length(), type::target_type(), value::type(), type_length_units(), and value_as_long().
Referenced by eval_op_sub(), valpy_binop_throw(), and vlscm_binop_gdbthrow().
Definition at line 1529 of file valarith.c.
References value::contents(), type::length(), s1, s2, and value::type().
Referenced by value_equal(), and value_less().
Definition at line 141 of file valarith.c.
References value::address, value::allocate(), value::bytes_available(), language_defn::c_style_arrays_p(), check_typedef(), type::code(), coerce_ref(), current_language, get_discrete_high_bound(), get_discrete_low_bound(), type::index_type(), value::lazy(), value::lval(), lval_memory, value::mark_bytes_unavailable(), value::set_address(), value::set_lval(), type::target_type(), value::type(), type_length_units(), value_coerce_array(), value_ind(), value_ptradd(), and value_subscripted_rvalue().
Referenced by ada_promote_array_of_integrals(), ada_value_subscript(), c_describe_child(), create_value(), eval_multi_subscript(), eval_op_m2_subscript(), eval_op_subscript(), expr::opencl_ternop_cond_operation::evaluate(), gdbscm_value_subscript(), gnuv2_virtual_fn_field(), gnuv3_baseclass_offset(), gnuv3_get_virtual_fn(), lval_func_write(), opencl_logical_not(), print_one_vtable(), read_atcb(), rust_subscript(), valpy_getitem(), value_complement(), value_neg(), vector_binop(), and vector_relop().
|
static |
Definition at line 209 of file valarith.c.
References value::address, type::arch(), type::bit_stride(), type::bounds(), check_typedef(), gdbarch_addressable_memory_unit_size(), range_bounds::high, is_dynamic_type(), dynamic_prop::kind(), value::lval(), lval_memory, PROP_UNDEFINED, resolve_dynamic_type(), type::target_type(), value::type(), type_length_units(), type_not_allocated(), type_not_associated(), and value_from_component().
Referenced by value_subscript().
Definition at line 257 of file valarith.c.
References check_typedef(), type::code(), type::is_array_like(), type::language(), language_def(), language_defn::to_array(), and value::type().
Referenced by valpy_to_array().
|
static |
Definition at line 338 of file valarith.c.
References BOTH, find_overload_match(), value_ind(), and value_of_variable().
Referenced by value_user_defined_op().
|
static |
Definition at line 369 of file valarith.c.
References current_language, language_defn::la_language, language_cplus, name, value_struct_elt(), and value_user_defined_cpp_op().
Referenced by value_x_binop(), and value_x_unop().
Definition at line 1373 of file valarith.c.
References value::allocate(), check_typedef(), type::code(), value::contents_all(), value::contents_writeable(), get_array_bounds(), type::is_vector(), type::length(), type::target_type(), value::type(), value_cast(), and value_equal().
Referenced by opencl_value_cast(), and value_binop().
struct value * value_x_binop | ( | struct value * | arg1, |
struct value * | arg2, | ||
enum exp_opcode | op, | ||
enum exp_opcode | otherop, | ||
enum noside noside noside | ) |
Definition at line 396 of file valarith.c.
References call_function_by_hand(), check_typedef(), code, type::code(), coerce_ref(), EVAL_AVOID_SIDE_EFFECTS, value::lval(), type::target_type(), value::type(), value_addr(), value_user_defined_op(), and value::zero().
Referenced by eval_binop_assign_modify(), eval_multi_subscript(), 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_sub(), eval_op_subscript(), expr::logical_and_operation::evaluate(), expr::logical_or_operation::evaluate(), and valpy_binop_throw().
Definition at line 572 of file valarith.c.
References type::arch(), call_function_by_hand(), check_typedef(), code, type::code(), coerce_ref(), EVAL_AVOID_SIDE_EFFECTS, value::lval(), type::target_type(), value::type(), value_addr(), value_from_longest(), value_user_defined_op(), and value::zero().
Referenced by eval_op_complement(), eval_op_ind(), eval_op_lognot(), eval_op_neg(), eval_op_plus(), eval_op_postdec(), eval_op_postinc(), eval_op_predec(), eval_op_preinc(), eval_op_structop_ptr(), expr::unop_ind_base_operation::evaluate_for_address(), and expr::structop_base_operation::evaluate_funcall().
|
static |
Definition at line 1416 of file valarith.c.
References value::allocate(), check_typedef(), type::code(), value::contents_all(), value::contents_writeable(), get_array_bounds(), type::is_unsigned(), type::is_vector(), type::length(), type::target_type(), value::type(), value_binop(), and value_subscript().
Referenced by value_binop().