GDB (xrefs)
|
#include "defs.h"
#include "gdb_string.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "expression.h"
#include "target.h"
#include "frame.h"
#include "language.h"
#include "f-lang.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 "exceptions.h"
#include "regcache.h"
#include "user-regs.h"
#include "valprint.h"
#include "gdb_obstack.h"
#include "objfiles.h"
#include "python/python.h"
#include "gdb_assert.h"
#include <ctype.h>
Go to the source code of this file.
void binop_promote | ( | const struct language_defn * | language, |
struct gdbarch * | gdbarch, | ||
struct value ** | arg1, | ||
struct value ** | arg2 | ||
) |
Definition at line 463 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_type::builtin_unsigned_int, builtin_type::builtin_unsigned_long, builtin_type::builtin_unsigned_long_long, check_typedef(), coerce_ref(), gdbarch_double_bit(), gdbarch_long_bit(), HOST_CHAR_BIT, is_integral_type(), language_defn::la_language, language_asm, language_c, language_cplus, language_objc, language_opencl, lookup_signed_typename(), lookup_unsigned_typename(), TYPE_CODE, TYPE_CODE_BOOL, TYPE_CODE_DECFLOAT, TYPE_CODE_FLT, TYPE_LENGTH, TYPE_UNSIGNED, value_cast(), and value_type().
Referenced by evaluate_subexp_standard().
int calc_f77_array_dims | ( | struct type * | array_type | ) |
Definition at line 3076 of file eval.c.
References _, error(), TYPE_CODE, TYPE_CODE_ARRAY, and TYPE_TARGET_TYPE.
Referenced by evaluate_subexp_standard(), and f77_print_array().
struct value* evaluate_expression | ( | struct expression * | exp | ) | [read] |
Definition at line 142 of file eval.c.
References EVAL_NORMAL, evaluate_subexp(), and NULL_TYPE.
Referenced by ada_read_renaming_var_value(), breakpoint_cond_eval(), do_one_display(), encode_actions_1(), execute_control_command(), gdb_eval(), info_mach_region_command(), init_if_undefined_command(), mi_cmd_data_evaluate_expression(), output_command_const(), parse_and_eval(), parse_and_eval_address(), parse_and_eval_long(), parse_to_comma_and_eval(), print_command_1(), print_variable_or_computed(), return_command(), set_command(), should_stop_exception(), value_of_root_1(), varobj_create(), varobj_set_value(), wrap_evaluate_expression(), and x_command().
static struct value* evaluate_struct_tuple | ( | struct value * | struct_val, |
struct expression * | exp, | ||
int * | pos, | ||
enum noside noside | , | ||
int | nargs | ||
) | [static, read] |
Referenced by evaluate_subexp_standard().
struct value* evaluate_subexp | ( | struct type * | expect_type, |
struct expression * | exp, | ||
int * | pos, | ||
enum noside noside | |||
) | [read] |
Definition at line 68 of file eval.c.
References exp_descriptor::evaluate_exp, language_defn::la_exp_desc, and expression::language_defn.
Referenced by evaluate_expression(), evaluate_subexp_for_sizeof(), evaluate_subexp_opencl(), evaluate_subexp_standard(), evaluate_subexp_type(), evaluate_subexp_with_coercion(), evaluate_subexpression_type(), evaluate_type(), fetch_subexp_value(), gen_expr(), print_object_command(), and value_f90_subarray().
static struct value* evaluate_subexp_for_address | ( | struct expression * | exp, |
int * | pos, | ||
enum noside noside | |||
) | [static, read] |
Referenced by evaluate_subexp_standard().
static struct value * evaluate_subexp_for_sizeof | ( | struct expression * | exp, |
int * | pos | ||
) | [static, read] |
Definition at line 3003 of file eval.c.
References _, builtin_type::builtin_int, builtin_type(), check_typedef(), expression::elts, error(), EVAL_AVOID_SIDE_EFFECTS, evaluate_subexp(), expression::gdbarch, LONGEST, NULL_TYPE, exp_element::opcode, exp_element::symbol, SYMBOL_TYPE, exp_element::type, type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_LENGTH, TYPE_TARGET_TYPE, value_from_longest(), and value_type().
Referenced by evaluate_subexp_standard().
struct value* evaluate_subexp_standard | ( | struct type * | expect_type, |
struct expression * | exp, | ||
int * | pos, | ||
enum noside noside | |||
) | [read] |
Definition at line 697 of file eval.c.
References _, access_value_history(), allocate_repeat_value(), allocate_value(), binop_promote(), binop_user_defined_p(), exp_element::block, block_for_pc(), builtin_type::builtin_data_ptr, builtin_type::builtin_int, builtin_type::builtin_long, builtin_type(), BYTES_TO_EXP_ELEM, calc_f77_array_dims(), call_function_by_hand(), call_internal_function(), check_typedef(), CHECK_TYPEDEF, code, coerce_ref(), cp_lookup_symbol_namespace(), cplus_method_ptr_to_value(), cplus_typeid(), cplus_typeid_type(), current_target, exp_element::decfloatconst, deprecated_set_value_type(), exp_element::doubleconst, expression::elts, gdb_exception::error, error(), EVAL_AVOID_SIDE_EFFECTS, EVAL_NORMAL, EVAL_SKIP, evaluate_struct_tuple(), evaluate_subexp(), evaluate_subexp_for_address(), evaluate_subexp_for_sizeof(), evaluate_subexp_with_coercion(), f77_get_lowerbound(), find_function_addr(), find_function_in_inferior(), find_overload_match(), find_pc_function(), gdb_assert, expression::gdbarch, gdbarch_bits_big_endian(), gdbarch_convert_from_func_ptr_addr(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), get_discrete_bounds(), get_selected_block(), get_selected_frame(), get_user_print_options(), init_array_element(), exp_element::internalvar, is_integral_type(), language_defn::la_language, language_bool_type(), language_cplus, expression::language_defn, language_string_char_type(), len, exp_element::longconst, LONGEST, longest_to_int(), lookup_child_selector(), lookup_function_type(), lookup_minimal_symbol(), lookup_pointer_type(), lookup_reference_type(), lval_memory, make_params(), MAX_FORTRAN_DIMS, memcpy(), memset(), METHOD, name, NON_METHOD, NOT_FOUND_ERROR, not_lval, NULL_TYPE, value_print_options::objectprint, exp_element::objfile, exp_element::opcode, overload_resolution, ptrmath_type_p(), gdb_exception::reason, register_type(), RETURN_MASK_ERROR, selector, exp_element::string, exp_element::symbol, SYMBOL_COMPUTED_OPS, SYMBOL_PRINT_NAME, SYMBOL_TYPE, target_translate_tls_address(), throw_exception(), TRY_CATCH, exp_element::type, type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_CLASS, TYPE_CODE_ENUM, TYPE_CODE_ERROR, TYPE_CODE_FUNC, TYPE_CODE_INT, TYPE_CODE_INTERNAL_FUNCTION, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHODPTR, TYPE_CODE_NAMESPACE, TYPE_CODE_PTR, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_CODE_SET, TYPE_CODE_STRING, TYPE_CODE_STRUCT, TYPE_CODE_TYPEDEF, TYPE_CODE_UNION, TYPE_DOMAIN_TYPE, TYPE_FIELD_TYPE, TYPE_FIELDS, TYPE_GNU_IFUNC, TYPE_INDEX_TYPE, TYPE_LENGTH, TYPE_MAIN_TYPE, TYPE_NAME, TYPE_NFIELDS, TYPE_TAG_NAME, TYPE_TARGET_TYPE, unop_promote(), unop_user_defined_p(), user_reg_map_name_to_regnum(), using_struct_return(), value_address(), value_aggregate_elt(), value_array(), value_as_address(), value_as_long(), value_assign(), value_at_lazy(), value_binop(), value_cast(), value_cast_pointers(), value_complement(), value_concat(), value_contents(), value_contents_raw(), value_dynamic_cast(), value_embedded_offset(), value_equal(), value_f90_subarray(), value_from_decfloat(), value_from_double(), value_from_longest(), value_from_pointer(), value_in(), value_ind(), value_less(), value_literal_complex(), value_logical_not(), VALUE_LVAL, value_neg(), value_non_lval(), value_nsstring(), value_of_internalvar(), value_of_register(), value_of_this(), value_of_variable(), value_one(), value_pos(), value_ptradd(), value_ptrdiff(), value_reinterpret_cast(), value_repeat(), value_rtti_indirect_type(), value_slice(), value_string(), value_struct_elt(), value_subscript(), value_subscripted_rvalue(), value_type(), value_x_binop(), value_x_unop(), value_zero(), VAR_DOMAIN, warning(), and xfree().
Referenced by evaluate_subexp_c(), evaluate_subexp_java(), evaluate_subexp_modula2(), and stap_evaluate_probe_argument().
struct value* evaluate_subexp_with_coercion | ( | struct expression * | exp, |
int * | pos, | ||
enum noside noside | |||
) | [read] |
Definition at line 2965 of file eval.c.
References address_of_variable(), exp_element::block, CAST_IS_CONVERSION, check_typedef(), expression::elts, evaluate_subexp(), expression::language_defn, lookup_pointer_type(), NULL_TYPE, exp_element::opcode, exp_element::symbol, SYMBOL_TYPE, type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_TARGET_TYPE, TYPE_VECTOR, and value_cast().
Referenced by evaluate_subexp_java(), evaluate_subexp_modula2(), and evaluate_subexp_standard().
struct value* evaluate_subexpression_type | ( | struct expression * | exp, |
int | subexp | ||
) | [read] |
Definition at line 164 of file eval.c.
References EVAL_AVOID_SIDE_EFFECTS, evaluate_subexp(), and NULL_TYPE.
Referenced by parse_expression_for_completion().
struct value* evaluate_type | ( | struct expression * | exp | ) | [read] |
Definition at line 153 of file eval.c.
References EVAL_AVOID_SIDE_EFFECTS, evaluate_subexp(), and NULL_TYPE.
Referenced by gnuv3_get_type_from_type_info(), maintenance_print_type(), print_variable_or_computed(), varobj_create(), whatis_exp(), and wrap_evaluate_type().
char* extract_field_op | ( | struct expression * | exp, |
int * | subexp | ||
) |
Definition at line 271 of file eval.c.
References BYTES_TO_EXP_ELEM, expression::elts, exp_element::longconst, longest_to_int(), exp_element::opcode, and exp_element::string.
Referenced by parse_expression_for_completion().
void fetch_subexp_value | ( | struct expression * | exp, |
int * | pc, | ||
struct value ** | valp, | ||
struct value ** | resultp, | ||
struct value ** | val_chain, | ||
int | preserve_errors | ||
) |
Definition at line 193 of file eval.c.
References gdb_exception::error, EVAL_NORMAL, evaluate_subexp(), MEMORY_ERROR, NULL_TYPE, gdb_exception::reason, RETURN_MASK_ALL, RETURN_MASK_ERROR, throw_exception(), TRY_CATCH, value_fetch_lazy(), value_lazy(), value_mark(), and value_release_to_mark().
Referenced by check_condition(), update_watchpoint(), watch_command_1(), and watchpoint_check().
static LONGEST init_array_element | ( | struct value * | array, |
struct value * | element, | ||
struct expression * | exp, | ||
int * | pos, | ||
enum noside noside | , | ||
LONGEST | low_bound, | ||
LONGEST | high_bound | ||
) | [static] |
Referenced by evaluate_subexp_standard().
static struct type* make_params | ( | int | num_types, |
struct type ** | param_types | ||
) | [static, read] |
Definition at line 661 of file eval.c.
References check_typedef(), gdb_assert, type, TYPE_CHAIN, TYPE_CODE, TYPE_CODE_METHOD, TYPE_CODE_VOID, TYPE_FIELD_TYPE, TYPE_FIELDS, TYPE_LENGTH, TYPE_MAIN_TYPE, TYPE_NFIELDS, TYPE_PROTOTYPED, TYPE_VARARGS, TYPE_VPTR_FIELDNO, TYPE_ZALLOC, and XZALLOC.
Referenced by evaluate_subexp_standard().
struct value* parse_and_eval | ( | const char * | exp | ) | [read] |
Definition at line 107 of file eval.c.
References do_cleanups(), evaluate_expression(), free_current_contents(), make_cleanup(), and parse_expression().
Referenced by display_tib(), do_captured_thread_select(), dump_value_to_file(), ignore_command(), info_task(), info_vtbl_command(), mi_cmd_trace_define_variable(), parse_frame_specification_1(), print_ada_task_info(), quit_force(), task_command_1(), and trace_variable_command().
CORE_ADDR parse_and_eval_address | ( | const char * | exp | ) |
Definition at line 79 of file eval.c.
References do_cleanups(), evaluate_expression(), free_current_contents(), make_cleanup(), 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(), bsd_kvm_pcb_cmd(), bsd_kvm_proc_cmd(), disassemble_command(), dump_memory_to_file(), go32_pte_for_address(), 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(), restore_command(), set_section_command(), set_task_exc_port_cmd(), set_thread_exc_port_cmd(), sym_info(), trace_find_outside_command(), trace_find_pc_command(), trace_find_range_command(), and unwind_command().
LONGEST parse_and_eval_long | ( | const char * | exp | ) |
Definition at line 94 of file eval.c.
References do_cleanups(), evaluate_expression(), free_current_contents(), LONGEST, make_cleanup(), parse_expression(), and value_as_long().
Referenced by add_inferior_command(), backtrace_command_1(), breakpoint_1(), call_lseek(), clone_inferior_command(), cmd_record_goto(), continue_command(), delete_checkpoint_command(), detach_checkpoint_command(), display_selectors(), do_set_command(), down_silently_base(), go32_pde(), go32_pte(), go32_sgdt(), go32_sidt(), go32_sldt(), inferior_command(), info_checkpoints_command(), maintenance_info_program_spaces_command(), restart_command(), restore_command(), set_radix(), show_commands(), show_values(), signal_command(), signals_info(), step_1(), trace_find_command(), trace_find_tracepoint_command(), and up_silently_base().
struct type* parse_and_eval_type | ( | char * | p, |
int | length | ||
) | [read] |
Definition at line 3059 of file eval.c.
References _, expression::elts, error(), memcpy(), exp_element::opcode, parse_expression(), and exp_element::type.
Referenced by safe_parse_type().
struct value* parse_to_comma_and_eval | ( | const char ** | expp | ) | [read] |
Definition at line 124 of file eval.c.
References do_cleanups(), evaluate_expression(), free_current_contents(), make_cleanup(), and parse_exp_1().
Referenced by disassemble_command(), info_port_rights(), linespec_expression_to_pc(), parse_find_args(), ui_printf(), and watch_command_1().
static int ptrmath_type_p | ( | const struct language_defn * | lang, |
struct type * | type | ||
) | [static] |
Definition at line 636 of file eval.c.
References language_defn::c_style_arrays, check_typedef(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_FUNC, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_TARGET_TYPE, and TYPE_VECTOR.
Referenced by evaluate_subexp_standard().
void unop_promote | ( | const struct language_defn * | language, |
struct gdbarch * | gdbarch, | ||
struct value ** | arg1 | ||
) |
Definition at line 430 of file eval.c.
References builtin_type::builtin_int, builtin_type(), check_typedef(), coerce_ref(), is_integral_type(), language_defn::la_language, TYPE_LENGTH, value_cast(), and value_type().
Referenced by evaluate_subexp_standard().
static struct value* value_f90_subarray | ( | struct value * | array, |
struct expression * | exp, | ||
int * | pos, | ||
enum noside | noside | ||
) | [static, read] |
Definition at line 400 of file eval.c.
References BOTH_BOUND_DEFAULT, check_typedef(), expression::elts, evaluate_subexp(), HIGH_BOUND_DEFAULT, exp_element::longconst, LONGEST, longest_to_int(), LOW_BOUND_DEFAULT, NULL_TYPE, TYPE_HIGH_BOUND, TYPE_INDEX_TYPE, TYPE_LOW_BOUND, value_as_long(), value_slice(), and value_type().
Referenced by evaluate_subexp_standard().
Definition at line 116 of file valops.c.
Referenced by evaluate_subexp_standard().