|
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 "common/byte-vector.h"Go to the source code of this file.
Macros | |
| #define | TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2) |
Functions | |
| 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_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound) |
| 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 (struct value **args, int nargs, char *oper, int *static_memfuncp, enum noside noside) |
| static struct value * | value_user_defined_op (struct value **argp, struct value **args, char *name, int *static_memfuncp, int nargs, 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 LONGEST | integer_pow (LONGEST v1, LONGEST v2) |
| static ULONGEST | uinteger_pow (ULONGEST v1, LONGEST v2) |
| 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 * | scalar_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) |
| 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) |
| int | 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 | value_in (struct value *element, struct value *set) |
| void | _initialize_valarith (void) |
| #define TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2) |
Definition at line 35 of file valarith.c.
Referenced by scalar_binop().
| void _initialize_valarith | ( | void | ) |
Definition at line 1759 of file valarith.c.
| int binop_types_user_defined_p | ( | enum exp_opcode | op, |
| struct type * | type1, | ||
| struct type * | type2 | ||
| ) |
Definition at line 224 of file valarith.c.
References check_typedef(), TYPE_CODE, TYPE_CODE_STRUCT, TYPE_IS_REFERENCE, and TYPE_TARGET_TYPE.
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 249 of file valarith.c.
References binop_types_user_defined_p(), and value_type().
Referenced by evaluate_subexp_standard(), and valpy_binop_throw().
Definition at line 45 of file valarith.c.
References _, check_typedef(), error(), gdb_assert, name, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_VOID, type_length_units(), TYPE_NAME, TYPE_TAG_NAME, and TYPE_TARGET_TYPE.
Referenced by value_ptradd().
Definition at line 787 of file valarith.c.
Referenced by scalar_binop().
|
static |
Definition at line 914 of file valarith.c.
References _, allocate_value(), check_typedef(), coerce_ref(), error(), gdbarch_byte_order(), get_type_arch(), integer_pow(), is_floating_type(), is_floating_value(), is_integral_type(), store_signed_integer(), store_unsigned_integer(), target_float_binop(), TRUNCATION_TOWARDS_ZERO, TYPE_CODE, TYPE_CODE_BOOL, TYPE_LENGTH, TYPE_UNSIGNED, uinteger_pow(), value_args_as_target_float(), value_as_long(), value_contents_raw(), and value_type().
Referenced by value_binop().
Definition at line 818 of file valarith.c.
Referenced by scalar_binop().
| int unop_user_defined_p | ( | enum exp_opcode | op, |
| struct value * | arg1 | ||
| ) |
Definition at line 262 of file valarith.c.
References check_typedef(), TYPE_CODE, TYPE_CODE_STRUCT, TYPE_IS_REFERENCE, TYPE_TARGET_TYPE, and value_type().
Referenced by evaluate_funcall(), evaluate_subexp_for_address(), and evaluate_subexp_standard().
|
static |
Definition at line 848 of file valarith.c.
References _, check_typedef(), error(), gdb_assert, is_floating_type(), is_integral_type(), target_float_from_longest(), target_float_from_ulongest(), TYPE_CODE, TYPE_LENGTH, TYPE_NAME, TYPE_UNSIGNED, value_as_long(), value_contents(), and value_type().
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 1379 of file valarith.c.
References _, check_typedef(), error(), is_integral_type(), scalar_binop(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_DECFLOAT, TYPE_CODE_FLT, TYPE_VECTOR, value_type(), value_vector_widen(), and vector_binop().
Referenced by ada_delta(), ada_evaluate_subexp(), ada_scaling_factor(), ada_val_print_num(), ada_value_binop(), cast_from_fixed(), cast_to_fixed(), evaluate_subexp_standard(), dwarf_expr_context::execute_stack_op(), valpy_binop_throw(), value_equal(), value_less(), value_neg(), vector_binop(), and vlscm_binop().
Definition at line 1714 of file valarith.c.
References extract_unsigned_integer(), gdbarch_bits_big_endian(), gdbarch_byte_order(), get_discrete_bounds(), get_type_arch(), TARGET_CHAR_BIT, and TYPE_INDEX_TYPE.
Referenced by m2_print_long_set(), m2_val_print(), pascal_val_print(), and value_in().
Definition at line 1675 of file valarith.c.
References _, allocate_value(), check_typedef(), coerce_ref(), error(), get_array_bounds(), is_integral_type(), type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_VECTOR, value_as_long(), value_complement(), value_contents_all(), value_contents_writeable(), value_from_longest(), value_subscript(), and value_type().
Referenced by evaluate_subexp_standard(), dwarf_expr_context::execute_stack_op(), rust_evaluate_subexp(), valpy_invert(), value_complement(), and vlscm_unop().
Definition at line 653 of file valarith.c.
References _, check_typedef(), error(), longest_to_int(), TYPE_CODE, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_INT, TYPE_CODE_STRING, TYPE_LENGTH, TYPE_TARGET_TYPE, unpack_long(), value_as_long(), value_contents(), value_string(), and value_type().
Referenced by evaluate_subexp_standard().
Definition at line 1474 of file valarith.c.
References _, check_typedef(), coerce_array(), error(), is_floating_value(), is_integral_type(), longest_to_int(), target_float_compare(), TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_STRING, TYPE_LENGTH, value_args_as_target_float(), value_as_address(), value_as_long(), value_binop(), value_contents(), value_strcmp(), and value_type().
Referenced by ada_evaluate_subexp(), ada_value_equal(), evaluate_subexp_standard(), dwarf_expr_context::execute_stack_op(), gdbscm_value_to_real(), print_fixed_point_type(), scalar_relop(), valpy_richcompare_throw(), value_vector_widen(), vlscm_equal_p_value_smob(), and vlscm_rich_compare().
Definition at line 1549 of file valarith.c.
References check_typedef(), TYPE_CODE, TYPE_LENGTH, value_contents(), and value_type().
Referenced by watchpoint_check().
Definition at line 1736 of file valarith.c.
References _, check_typedef(), error(), TYPE_CODE, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_ENUM, TYPE_CODE_INT, TYPE_CODE_RANGE, TYPE_CODE_SET, TYPE_TARGET_TYPE, value_as_long(), value_bit_index(), value_contents(), and value_type().
Definition at line 1566 of file valarith.c.
References _, check_typedef(), coerce_array(), error(), is_floating_value(), is_integral_type(), longest_to_int(), target_float_compare(), TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_STRING, TYPE_LENGTH, value_args_as_target_float(), value_as_address(), value_as_long(), value_binop(), value_strcmp(), and value_type().
Referenced by ada_evaluate_subexp(), evaluate_subexp_standard(), dwarf_expr_context::execute_stack_op(), scalar_relop(), valpy_absolute(), valpy_richcompare_throw(), vlscm_rich_compare(), and vlscm_unop().
| int value_logical_not | ( | struct value * | arg1 | ) |
Definition at line 1416 of file valarith.c.
References check_typedef(), coerce_array(), is_floating_value(), target_float_is_zero(), TYPE_LENGTH, value_contents(), and value_type().
Referenced by evaluate_subexp_opencl(), evaluate_subexp_standard(), opencl_logical_not(), rust_evaluate_subexp(), scalar_relop(), value_allocate_space_in_inferior(), value_cast_pointers(), value_true(), and vlscm_unop().
Definition at line 1640 of file valarith.c.
References _, allocate_value(), check_typedef(), coerce_ref(), error(), get_array_bounds(), is_floating_type(), is_integral_type(), type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_VECTOR, value_binop(), value_contents_all(), value_contents_writeable(), value_from_longest(), value_neg(), value_subscript(), and value_type().
Referenced by ada_evaluate_subexp(), const_expr(), evaluate_subexp_standard(), dwarf_expr_context::execute_stack_op(), valpy_negative(), value_neg(), and vlscm_unop().
Definition at line 1622 of file valarith.c.
References _, check_typedef(), coerce_ref(), error(), is_floating_value(), is_integral_type(), type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_VECTOR, value_contents(), value_from_contents(), and value_type().
Referenced by evaluate_subexp_standard().
Definition at line 80 of file valarith.c.
References check_typedef(), coerce_array(), find_size_for_pointer_math(), lval_internalvar, set_value_component_location(), value_as_address(), value_from_pointer(), VALUE_LVAL, and value_type().
Referenced by ada_get_tsd_from_tag(), ada_tag_value_at_base_address(), ada_value_ptr_subscript(), evaluate_subexp_modula2(), evaluate_subexp_standard(), gnuv2_virtual_fn_field(), gnuv3_method_ptr_to_value(), valpy_binop_throw(), value_subscript(), and vlscm_binop().
Definition at line 101 of file valarith.c.
References _, check_typedef(), coerce_array(), error(), gdb_assert, TYPE_CODE, TYPE_CODE_PTR, TYPE_LENGTH, type_length_units(), TYPE_TARGET_TYPE, value_as_long(), value_type(), and warning().
Referenced by evaluate_subexp_standard(), valpy_binop_throw(), and vlscm_binop().
Definition at line 1444 of file valarith.c.
References TYPE_LENGTH, value_contents(), and value_type().
Referenced by value_equal(), and value_less().
Definition at line 142 of file valarith.c.
References _, language_defn::c_style_arrays, check_typedef(), coerce_ref(), current_language, error(), get_discrete_bounds(), lval_memory, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRING, TYPE_INDEX_TYPE, value_coerce_array(), value_ind(), VALUE_LVAL, value_ptradd(), value_subscripted_rvalue(), value_type(), and warning().
Referenced by ada_promote_array_of_integrals(), ada_value_subscript(), c_describe_child(), create_value(), evaluate_subexp_modula2(), evaluate_subexp_opencl(), evaluate_subexp_standard(), f77_print_array_1(), 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().
Definition at line 187 of file valarith.c.
References _, check_typedef(), error(), is_dynamic_type(), resolve_dynamic_type(), TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED, type_length_units(), type_not_allocated(), type_not_associated(), TYPE_TARGET_TYPE, value_address(), value_from_component(), and value_type().
Referenced by evaluate_subexp_standard(), and value_subscript().
|
static |
Definition at line 283 of file valarith.c.
References _, BOTH, error(), find_overload_match(), value_ind(), and value_of_variable().
Referenced by value_user_defined_op().
|
static |
Definition at line 314 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 1289 of file valarith.c.
References _, allocate_value(), check_typedef(), error(), gdb_assert, get_array_bounds(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_VECTOR, value_cast(), value_contents_all(), value_contents_writeable(), value_equal(), and value_type().
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 | |||
| ) |
Definition at line 341 of file valarith.c.
References _, call_function_by_hand(), call_xmethod(), check_typedef(), coerce_ref(), error(), EVAL_AVOID_SIDE_EFFECTS, gdb_assert, NOT_FOUND_ERROR, result_type_of_xmethod(), throw_error(), TYPE_CODE, TYPE_CODE_STRUCT, TYPE_CODE_XMETHOD, TYPE_TARGET_TYPE, value_addr(), VALUE_LVAL, value_type(), value_user_defined_op(), and value_zero().
Referenced by evaluate_subexp_standard(), and valpy_binop_throw().
| struct value* value_x_unop | ( | struct value * | arg1, |
| enum exp_opcode | op, | ||
| enum noside noside | |||
| ) |
Definition at line 521 of file valarith.c.
References _, call_function_by_hand(), call_xmethod(), check_typedef(), coerce_ref(), error(), EVAL_AVOID_SIDE_EFFECTS, gdb_assert, get_type_arch(), NOT_FOUND_ERROR, result_type_of_xmethod(), throw_error(), TYPE_CODE, TYPE_CODE_STRUCT, TYPE_CODE_XMETHOD, TYPE_TARGET_TYPE, value_addr(), value_from_longest(), VALUE_LVAL, value_type(), value_user_defined_op(), and value_zero().
Referenced by evaluate_funcall(), evaluate_subexp_for_address(), and evaluate_subexp_standard().
|
static |
Definition at line 1329 of file valarith.c.
References _, allocate_value(), check_typedef(), error(), get_array_bounds(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_UNSIGNED, TYPE_VECTOR, value_binop(), value_contents_all(), value_contents_writeable(), value_free_to_mark(), value_mark(), value_subscript(), and value_type().
Referenced by value_binop().
1.8.14