GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "frame.h"
#include "inferior.h"
#include "gdbcore.h"
#include "target.h"
#include "demangle.h"
#include "language.h"
#include "gdbcmd.h"
#include "regcache.h"
#include "cp-abi.h"
#include "block.h"
#include "infcall.h"
#include "dictionary.h"
#include "cp-support.h"
#include "dfp.h"
#include "tracepoint.h"
#include <errno.h>
#include "gdb_string.h"
#include "gdb_assert.h"
#include "observer.h"
#include "objfiles.h"
#include "exceptions.h"
Go to the source code of this file.
Enumerations | |
enum | oload_classification { STANDARD, NON_STANDARD, INCOMPATIBLE } |
Functions | |
static int | typecmp (int staticp, int varargs, int nargs, struct field t1[], struct value *t2[]) |
static struct value * | search_struct_field (const char *, struct value *, int, struct type *, int) |
static struct value * | search_struct_method (const char *, struct value **, struct value **, int, int *, struct type *) |
static int | find_oload_champ_namespace (struct value **, int, const char *, const char *, struct symbol ***, struct badness_vector **, const int no_adl) |
static int | find_oload_champ_namespace_loop (struct value **, int, const char *, const char *, int, struct symbol ***, struct badness_vector **, int *, const int no_adl) |
static int | find_oload_champ (struct value **, int, int, int, struct fn_field *, struct symbol **, struct badness_vector **) |
static int | oload_method_static (int, struct fn_field *, int) |
static enum oload_classification | classify_oload_match (struct badness_vector *, int, int) |
static struct value * | value_struct_elt_for_reference (struct type *, int, struct type *, char *, struct type *, int, enum noside) |
static struct value * | value_namespace_elt (const struct type *, char *, int, enum noside) |
static struct value * | value_maybe_namespace_elt (const struct type *, char *, int, enum noside) |
static CORE_ADDR | allocate_space_in_inferior (int) |
static struct value * | cast_into_complex (struct type *, struct value *) |
static struct fn_field * | find_method_list (struct value **, const char *, int, struct type *, int *, struct type **, int *) |
void | _initialize_valops (void) |
static void | show_overload_resolution (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
struct value * | find_function_in_inferior (const char *name, struct objfile **objf_p) |
struct value * | value_allocate_space_in_inferior (int len) |
static struct value * | value_cast_structs (struct type *type, struct value *v2) |
struct value * | value_cast_pointers (struct type *type, struct value *arg2, int subclass_check) |
struct value * | value_cast (struct type *type, struct value *arg2) |
struct value * | value_reinterpret_cast (struct type *type, struct value *arg) |
static int | dynamic_cast_check_1 (struct type *desired_type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct value *val, struct type *search_type, CORE_ADDR arg_addr, struct type *arg_type, struct value **result) |
static int | dynamic_cast_check_2 (struct type *desired_type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct value *val, struct type *search_type, struct value **result) |
struct value * | value_dynamic_cast (struct type *type, struct value *arg) |
struct value * | value_zero (struct type *type, enum lval_type lv) |
struct value * | value_one (struct type *type) |
static struct value * | get_value_at (struct type *type, CORE_ADDR addr, int lazy) |
struct value * | value_at (struct type *type, CORE_ADDR addr) |
struct value * | value_at_lazy (struct type *type, CORE_ADDR addr) |
void | read_value_memory (struct value *val, int embedded_offset, int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length) |
struct value * | value_assign (struct value *toval, struct value *fromval) |
struct value * | value_repeat (struct value *arg1, int count) |
struct value * | value_of_variable (struct symbol *var, const struct block *b) |
struct value * | address_of_variable (struct symbol *var, const struct block *b) |
int | value_must_coerce_to_target (struct value *val) |
struct value * | value_coerce_to_target (struct value *val) |
struct value * | value_coerce_array (struct value *arg1) |
struct value * | value_coerce_function (struct value *arg1) |
struct value * | value_addr (struct value *arg1) |
struct value * | value_ref (struct value *arg1) |
struct value * | value_ind (struct value *arg1) |
struct value * | value_array (int lowbound, int highbound, struct value **elemvec) |
struct value * | value_cstring (char *ptr, ssize_t len, struct type *char_type) |
struct value * | value_string (char *ptr, ssize_t len, struct type *char_type) |
static void | update_search_result (struct value **result_ptr, struct value *v, int *last_boffset, int boffset, const char *name, struct type *type) |
static void | do_search_struct_field (const char *name, struct value *arg1, int offset, struct type *type, int looking_for_baseclass, struct value **result_ptr, int *last_boffset, struct type *outermost_type) |
struct value * | value_struct_elt (struct value **argp, struct value **args, const char *name, int *static_memfuncp, const char *err) |
static struct fn_field * | value_find_oload_method_list (struct value **argp, const char *method, int offset, int *num_fns, struct type **basetype, int *boffset) |
int | find_overload_match (struct value **args, int nargs, const char *name, enum oload_search_type method, struct value **objp, struct symbol *fsym, struct value **valp, struct symbol **symp, int *staticp, const int no_adl) |
int | destructor_name_p (const char *name, struct type *type) |
struct value * | value_aggregate_elt (struct type *curtype, char *name, struct type *expect_type, int want_address, enum noside noside) |
static int | compare_parameters (struct type *t1, struct type *t2, int skip_artificial) |
struct type * | value_rtti_indirect_type (struct value *v, int *full, int *top, int *using_enc) |
struct value * | value_full_object (struct value *argp, struct type *rtype, int xfull, int xtop, int xusing_enc) |
struct value * | value_of_this (const struct language_defn *lang) |
struct value * | value_of_this_silent (const struct language_defn *lang) |
struct value * | value_slice (struct value *array, int lowbound, int length) |
struct value * | value_literal_complex (struct value *arg1, struct value *arg2, struct type *type) |
Variables | |
unsigned int | overload_debug |
int | overload_resolution = 0 |
enum oload_classification |
void _initialize_valops | ( | void | ) |
struct value* address_of_variable | ( | struct symbol * | var, |
const struct block * | b | ||
) | [read] |
Definition at line 1356 of file valops.c.
References _, error(), frame_find_by_id(), gdb_assert, gdbarch_register_name(), get_frame_arch(), lookup_pointer_type(), lval_memory, lval_register, SYMBOL_PRINT_NAME, SYMBOL_TYPE, TYPE_CODE, TYPE_CODE_FUNC, value_address(), VALUE_FRAME_ID, value_from_pointer(), value_lazy(), VALUE_LVAL, value_of_variable(), and VALUE_REGNUM.
Referenced by evaluate_subexp_with_coercion().
static CORE_ADDR allocate_space_in_inferior | ( | int | len | ) | [static] |
Definition at line 211 of file valops.c.
References value_allocate_space_in_inferior(), and value_as_long().
Referenced by value_coerce_to_target().
static struct value * cast_into_complex | ( | struct type * | type, |
struct value * | val | ||
) | [static, read] |
Definition at line 3614 of file valops.c.
References _, allocate_value(), error(), memcpy(), not_lval, TYPE_CODE, TYPE_CODE_COMPLEX, TYPE_CODE_FLT, TYPE_CODE_INT, TYPE_LENGTH, TYPE_TARGET_TYPE, value_contents(), value_contents_raw(), value_literal_complex(), value_type(), and value_zero().
Referenced by value_cast().
static enum oload_classification classify_oload_match | ( | struct badness_vector * | oload_champ_bv, |
int | nargs, | ||
int | static_offset | ||
) | [static] |
Definition at line 2961 of file valops.c.
References compare_ranks(), INCOMPATIBLE, INCOMPATIBLE_TYPE_BADNESS, NON_STANDARD, NS_POINTER_CONVERSION_BADNESS, badness_vector::rank, and STANDARD.
Referenced by find_oload_champ_namespace_loop(), and find_overload_match().
static int compare_parameters | ( | struct type * | t1, |
struct type * | t2, | ||
int | skip_artificial | ||
) | [static] |
Definition at line 3052 of file valops.c.
References compare_ranks(), EXACT_MATCH_BADNESS, rank_one_type(), TYPE_CODE, TYPE_CODE_VOID, TYPE_FIELD_ARTIFICIAL, TYPE_FIELD_TYPE, and TYPE_NFIELDS.
int destructor_name_p | ( | const char * | name, |
struct type * | type | ||
) |
static void do_search_struct_field | ( | const char * | name, |
struct value * | arg1, | ||
int | offset, | ||
struct type * | type, | ||
int | looking_for_baseclass, | ||
struct value ** | result_ptr, | ||
int * | last_boffset, | ||
struct type * | outermost_type | ||
) | [static] |
Definition at line 1834 of file valops.c.
References _, baseclass_offset(), BASETYPE_VIA_VIRTUAL, check_typedef(), CHECK_TYPEDEF, deprecated_set_value_type(), error(), field_is_static(), offset, set_value_embedded_offset(), strcmp_iw(), target_read_memory(), TYPE_BASECLASS, TYPE_BASECLASS_BITPOS, TYPE_BASECLASS_NAME, TYPE_CODE, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELD, TYPE_FIELD_BITPOS, TYPE_FIELD_NAME, TYPE_FIELD_TYPE, TYPE_LENGTH, TYPE_N_BASECLASSES, TYPE_NFIELDS, update_search_result(), value_address(), value_at_lazy(), value_contents_for_printing(), value_contents_raw(), value_copy(), value_embedded_offset(), value_enclosing_type(), value_primitive_field(), value_static_field(), and value_type().
Referenced by search_struct_field().
static int dynamic_cast_check_1 | ( | struct type * | desired_type, |
const gdb_byte * | valaddr, | ||
int | embedded_offset, | ||
CORE_ADDR | address, | ||
struct value * | val, | ||
struct type * | search_type, | ||
CORE_ADDR | arg_addr, | ||
struct type * | arg_type, | ||
struct value ** | result | ||
) | [static] |
Definition at line 639 of file valops.c.
References baseclass_offset(), class_types_same_p(), offset, TYPE_BASECLASS, TYPE_LENGTH, TYPE_N_BASECLASSES, and value_at_lazy().
Referenced by value_dynamic_cast().
static int dynamic_cast_check_2 | ( | struct type * | desired_type, |
const gdb_byte * | valaddr, | ||
int | embedded_offset, | ||
CORE_ADDR | address, | ||
struct value * | val, | ||
struct type * | search_type, | ||
struct value ** | result | ||
) | [static] |
Definition at line 686 of file valops.c.
References baseclass_offset(), BASETYPE_VIA_PUBLIC, class_types_same_p(), offset, TYPE_BASECLASS, TYPE_N_BASECLASSES, and value_at_lazy().
Referenced by value_dynamic_cast().
struct value* find_function_in_inferior | ( | const char * | name, |
struct objfile ** | objf_p | ||
) | [read] |
Definition at line 132 of file valops.c.
References _, error(), get_objfile_arch(), LOC_BLOCK, lookup_bound_minimal_symbol(), lookup_function_type(), lookup_pointer_type(), lookup_symbol(), bound_minimal_symbol::minsym, bound_minimal_symbol::objfile, SYMBOL_CLASS, SYMBOL_SYMTAB, SYMBOL_VALUE_ADDRESS, target_has_execution, type, value_from_pointer(), value_of_variable(), and VAR_DOMAIN.
Referenced by call_target_sbrk(), checkpoint_command(), evaluate_subexp_standard(), inferior_call_waitpid(), lookup_child_selector(), lookup_objc_class(), print_object_command(), value_allocate_space_in_inferior(), and value_nsstring().
static struct fn_field * find_method_list | ( | struct value ** | argp, |
const char * | method, | ||
int | offset, | ||
struct type * | type, | ||
int * | num_fns, | ||
struct type ** | basetype, | ||
int * | boffset | ||
) | [static, read] |
Definition at line 2271 of file valops.c.
References baseclass_offset(), BASETYPE_VIA_VIRTUAL, check_stub_method_group(), CHECK_TYPEDEF, len, offset, strcmp_iw(), type, TYPE_BASECLASS, TYPE_BASECLASS_BITPOS, TYPE_FN_FIELDLIST1, TYPE_FN_FIELDLIST_LENGTH, TYPE_FN_FIELDLIST_NAME, TYPE_N_BASECLASSES, TYPE_NFN_FIELDS, value_address(), value_contents_for_printing(), and value_offset().
Referenced by value_find_oload_method_list().
static int find_oload_champ | ( | struct value ** | args, |
int | nargs, | ||
int | method, | ||
int | num_fns, | ||
struct fn_field * | fns_ptr, | ||
struct symbol ** | oload_syms, | ||
struct badness_vector ** | oload_champ_bv | ||
) | [static] |
Definition at line 2846 of file valops.c.
References compare_badness(), fprintf_filtered(), gdb_stderr, oload_method_static(), overload_debug, rank::rank, badness_vector::rank, rank_function(), SYMBOL_DEMANGLED_NAME, SYMBOL_TYPE, TYPE_FIELD_TYPE, TYPE_FN_FIELD_ARGS, TYPE_FN_FIELD_TYPE, TYPE_NFIELDS, xfree(), and xmalloc().
Referenced by find_oload_champ_namespace_loop(), and find_overload_match().
static int find_oload_champ_namespace | ( | struct value ** | args, |
int | nargs, | ||
const char * | func_name, | ||
const char * | qualified_name, | ||
struct symbol *** | oload_syms, | ||
struct badness_vector ** | oload_champ_bv, | ||
const int | no_adl | ||
) | [static] |
Definition at line 2689 of file valops.c.
References find_oload_champ_namespace_loop().
Referenced by find_overload_match().
static int find_oload_champ_namespace_loop | ( | struct value ** | args, |
int | nargs, | ||
const char * | func_name, | ||
const char * | qualified_name, | ||
int | namespace_len, | ||
struct symbol *** | oload_syms, | ||
struct badness_vector ** | oload_champ_bv, | ||
int * | oload_champ, | ||
const int | no_adl | ||
) | [static] |
Definition at line 2718 of file valops.c.
References classify_oload_match(), cp_find_first_component(), discard_cleanups(), do_cleanups(), find_oload_champ(), gdb_assert, make_cleanup(), make_symbol_overload_list(), make_symbol_overload_list_adl(), STANDARD, value_type(), and xfree().
Referenced by find_oload_champ_namespace().
int find_overload_match | ( | struct value ** | args, |
int | nargs, | ||
const char * | name, | ||
enum oload_search_type | method, | ||
struct value ** | objp, | ||
struct symbol * | fsym, | ||
struct value ** | valp, | ||
struct symbol ** | symp, | ||
int * | staticp, | ||
const int | no_adl | ||
) |
Definition at line 2408 of file valops.c.
References _, all_cleanups(), BOTH, check_typedef(), classify_oload_match(), coerce_ref(), compare_badness(), cp_func_name(), do_cleanups(), error(), find_oload_champ(), find_oload_champ_namespace(), gdb_assert, INCOMPATIBLE, make_cleanup(), METHOD, name, NON_METHOD, NON_STANDARD, NOT_FOUND_ERROR, null_cleanup(), oload_method_static(), search_struct_field(), SYMBOL_NATURAL_NAME, SYMBOL_TYPE, throw_error(), TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_DOMAIN_TYPE, TYPE_FN_FIELD_VIRTUAL_P, TYPE_NAME, value_addr(), value_find_oload_method_list(), value_fn_field(), value_ind(), value_type(), value_virtual_fn_field(), warning(), and xfree().
Referenced by evaluate_subexp_standard(), and value_user_defined_cpp_op().
static struct value* get_value_at | ( | struct type * | type, |
CORE_ADDR | addr, | ||
int | lazy | ||
) | [static, read] |
Definition at line 908 of file valops.c.
References _, check_typedef(), error(), TYPE_CODE, TYPE_CODE_VOID, value_fetch_lazy(), and value_from_contents_and_address().
Referenced by value_at(), and value_at_lazy().
static int oload_method_static | ( | int | method, |
struct fn_field * | fns_ptr, | ||
int | index | ||
) | [static] |
Definition at line 2949 of file valops.c.
References TYPE_FN_FIELD_STATIC_P.
Referenced by find_oload_champ(), and find_overload_match().
void read_value_memory | ( | struct value * | val, |
int | embedded_offset, | ||
int | stack, | ||
CORE_ADDR | memaddr, | ||
gdb_byte * | buffer, | ||
size_t | length | ||
) |
Definition at line 950 of file valops.c.
References do_cleanups(), exec_ops, gdb_assert, mem_range::length, make_cleanup(), mark_value_bytes_unavailable(), max, mem_ranges_overlap(), memaddr, min, normalize_mem_ranges(), read_memory(), read_stack(), target_section_table::sections, target_section_table::sections_end, mem_range::start, target_get_section_table(), traceframe_available_memory(), VEC, VEC_cleanup, and VEC_iterate.
Referenced by call_function_by_hand(), read_pieced_value(), value_fetch_lazy(), and value_repeat().
static struct value * search_struct_field | ( | const char * | name, |
struct value * | arg1, | ||
int | offset, | ||
struct type * | type, | ||
int | looking_for_baseclass | ||
) | [static, read] |
Definition at line 2004 of file valops.c.
References do_search_struct_field().
Referenced by find_overload_match(), value_cast_structs(), and value_struct_elt().
static struct value * search_struct_method | ( | const char * | name, |
struct value ** | arg1p, | ||
struct value ** | args, | ||
int | offset, | ||
int * | static_memfuncp, | ||
struct type * | type | ||
) | [static, read] |
Definition at line 2024 of file valops.c.
References _, baseclass_offset(), BASETYPE_VIA_VIRTUAL, check_stub_method_group(), check_typedef(), CHECK_TYPEDEF, do_cleanups(), error(), make_cleanup(), offset, strcmp_iw(), target_read_memory(), TYPE_BASECLASS, TYPE_BASECLASS_BITPOS, TYPE_FN_FIELD_ARGS, TYPE_FN_FIELD_STATIC_P, TYPE_FN_FIELD_TYPE, TYPE_FN_FIELD_VIRTUAL_P, TYPE_FN_FIELDLIST1, TYPE_FN_FIELDLIST_LENGTH, TYPE_FN_FIELDLIST_NAME, TYPE_LENGTH, TYPE_N_BASECLASSES, TYPE_NFIELDS, TYPE_NFN_FIELDS, TYPE_VARARGS, typecmp(), value_address(), value_contents_for_printing(), value_fn_field(), value_from_contents_and_address(), value_virtual_fn_field(), xfree(), and xmalloc().
Referenced by value_struct_elt().
static void show_overload_resolution | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 118 of file valops.c.
References _, and fprintf_filtered().
static int typecmp | ( | int | staticp, |
int | varargs, | ||
int | nargs, | ||
struct field | t1[], | ||
struct value * | t2[] | ||
) | [static] |
Definition at line 1733 of file valops.c.
References _, check_typedef(), internal_error(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_VOID, TYPE_TARGET_TYPE, value_coerce_array(), value_ref(), and value_type().
Referenced by search_struct_method().
static void update_search_result | ( | struct value ** | result_ptr, |
struct value * | v, | ||
int * | last_boffset, | ||
int | boffset, | ||
const char * | name, | ||
struct type * | type | ||
) | [static] |
Definition at line 1809 of file valops.c.
References _, error(), and TYPE_SAFE_NAME.
Referenced by do_search_struct_field().
struct value* value_addr | ( | struct value * | arg1 | ) | [read] |
Definition at line 1509 of file valops.c.
References _, check_typedef(), deprecated_set_value_type(), error(), lookup_pointer_type(), lval_memory, set_value_enclosing_type(), set_value_pointed_to_offset(), TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_REF, TYPE_TARGET_TYPE, value_address(), value_coerce_function(), value_coerce_to_target(), value_copy(), value_embedded_offset(), value_enclosing_type(), value_from_pointer(), VALUE_LVAL, and value_type().
Referenced by ada_convert_actual(), amd64_windows_adjust_args_passed_by_pointer(), c_value_print(), call_function_by_hand(), evaluate_subexp_java(), find_function_addr(), find_overload_match(), gnuv2_virtual_fn_field(), gnuv3_get_virtual_fn(), gnuv3_print_vtable(), gnuv3_rtti_type(), java_print_value_fields(), make_array_descriptor(), print_one_vtable(), value_cast_pointers(), value_dynamic_cast(), value_fn_field(), value_ref(), value_reinterpret_cast(), value_x_binop(), value_x_unop(), and watch_command_1().
struct value* value_aggregate_elt | ( | struct type * | curtype, |
char * | name, | ||
struct type * | expect_type, | ||
int | want_address, | ||
enum noside noside | |||
) | [read] |
Definition at line 3022 of file valops.c.
References _, internal_error(), TYPE_CODE, TYPE_CODE_NAMESPACE, TYPE_CODE_STRUCT, TYPE_CODE_UNION, value_namespace_elt(), and value_struct_elt_for_reference().
Referenced by evaluate_subexp_standard().
struct value* value_allocate_space_in_inferior | ( | int | len | ) | [read] |
Definition at line 190 of file valops.c.
References _, call_function_by_hand(), error(), find_function_in_inferior(), get_objfile_arch(), target_has_execution, value_from_longest(), and value_logical_not().
Referenced by allocate_space_in_inferior(), ensure_lval(), and find_func_descr().
struct value* value_array | ( | int | lowbound, |
int | highbound, | ||
struct value ** | elemvec | ||
) | [read] |
Definition at line 1631 of file valops.c.
References _, allocate_value(), language_defn::c_style_arrays, current_language, error(), lookup_array_range_type(), TYPE_LENGTH, value_contents_copy(), and value_enclosing_type().
Referenced by evaluate_subexp_standard().
struct value* value_assign | ( | struct value * | toval, |
struct value * | fromval | ||
) | [read] |
Definition at line 1036 of file valops.c.
References _, CHECK_TYPEDEF, coerce_array(), coerce_ref(), current_target, deprecated_register_changed_hook, deprecated_safe_get_selected_frame(), deprecated_value_modifiable(), error(), frame_find_by_id(), gdb_assert, gdbarch_convert_register_p(), gdbarch_value_to_register(), get_frame_arch(), get_frame_id(), get_frame_register_bytes(), get_type_arch(), HOST_CHAR_BIT, int, LONGEST, lval_computed, lval_internalvar, lval_internalvar_component, lval_memory, lval_register, memcpy(), modify_field(), NOT_AVAILABLE_ERROR, observer_notify_target_changed(), offset, value::parent, put_frame_register_bytes(), read_memory(), select_frame(), set_internalvar(), set_internalvar_component(), set_value_enclosing_type(), set_value_lazy(), set_value_pointed_to_offset(), throw_error(), type, TYPE_CODE, TYPE_CODE_PTR, TYPE_LENGTH, TYPE_UNSIGNED, ULONGEST, value_address(), value_as_long(), value_bitpos(), value_bitsize(), value_cast(), value_computed_funcs(), value_contents(), value_contents_raw(), value_copy(), value_enclosing_type(), VALUE_FRAME_ID, value_from_longest(), VALUE_INTERNALVAR, VALUE_LVAL, value_must_coerce_to_target(), value_of_internalvar(), value_offset(), value_parent(), value_pointed_to_offset(), VALUE_REGNUM, value_type(), lval_funcs::write, and write_memory_with_notification().
Referenced by ada_value_assign(), evaluate_subexp_opencl(), evaluate_subexp_standard(), lval_func_write(), and varobj_set_value().
Definition at line 936 of file valops.c.
References get_value_at().
Referenced by ada_value_primitive_packed_val(), c_val_print(), default_read_var_value(), dynamic_array_type(), evaluate_subexp_java(), generic_val_print(), gnuv3_get_vtable(), java_class_from_object(), java_value_print(), pascal_val_print(), print_variable_at_address(), value_cast_structs(), and value_dynamic_cast().
struct value* value_at_lazy | ( | struct type * | type, |
CORE_ADDR | addr | ||
) | [read] |
Definition at line 944 of file valops.c.
References get_value_at().
Referenced by ada_value_slice_from_ptr(), ada_value_struct_elt(), coerce_ref(), default_read_var_value(), do_examine(), do_search_struct_field(), dwarf2_evaluate_loc_desc_full(), dynamic_cast_check_1(), dynamic_cast_check_2(), evaluate_subexp_standard(), frame_unwind_got_memory(), gnuv3_get_typeid(), gnuv3_get_vtable(), m2_print_unbounded_array(), print_subexp_standard(), stpy_convert_to_value(), value_cast(), value_cast_structs(), value_coerce_to_target(), value_dynamic_cast(), value_full_object(), value_ind(), and value_static_field().
struct value* value_cast | ( | struct type * | type, |
struct value * | arg2 | ||
) | [read] |
Definition at line 354 of file valops.c.
References _, allocate_value(), language_defn::c_style_arrays, cast_into_complex(), check_typedef(), CHECK_TYPEDEF, coerce_ref(), cplus_make_method_ptr(), create_array_type(), create_range_type(), current_language, decimal_convert(), decimal_from_floating(), decimal_from_integral(), deprecated_set_value_type(), error(), extract_unsigned_integer(), gdb_assert, gdbarch_addr_bit(), gdbarch_byte_order(), get_discrete_bounds(), get_type_arch(), HOST_CHAR_BIT, LONGEST, lval_memory, not_lval, set_value_enclosing_type(), set_value_pointed_to_offset(), TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_COMPLEX, TYPE_CODE_DECFLOAT, TYPE_CODE_ENUM, TYPE_CODE_FLT, TYPE_CODE_FUNC, TYPE_CODE_INT, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHODPTR, TYPE_CODE_PTR, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_CODE_VOID, TYPE_INDEX_TYPE, TYPE_LENGTH, TYPE_NAME, TYPE_TARGET_TYPE, TYPE_VECTOR, value_address(), value_as_double(), value_as_long(), value_at_lazy(), value_cast(), value_cast_pointers(), value_cast_structs(), value_coerce_array(), value_coerce_function(), value_contents(), value_contents_writeable(), value_copy(), value_from_decfloat(), value_from_double(), value_from_longest(), VALUE_LVAL, value_ref(), value_type(), value_zero(), and warning().
Referenced by aarch64_push_dummy_call(), ada_coerce_to_simple_array_ptr(), ada_get_tsd_from_tag(), ada_promote_array_of_integrals(), ada_tag_value_at_base_address(), ada_val_print_1(), ada_value_assign(), ada_value_cast(), ada_value_ptr_subscript(), ada_value_slice(), adjust_value_for_child_access(), alpha_push_dummy_call(), binop_promote(), compute_exception(), cplus_describe_child(), desc_bounds(), evaluate_subexp_java(), evaluate_subexp_modula2(), evaluate_subexp_standard(), evaluate_subexp_with_coercion(), execute_stack_op(), gnuv2_value_rtti_type(), gnuv2_virtual_fn_field(), gnuv3_get_typeid(), gnuv3_get_virtual_fn(), gnuv3_method_ptr_to_value(), gnuv3_virtual_fn_field(), hppa64_push_dummy_call(), lm32_push_dummy_call(), m88k_store_arguments(), opencl_value_cast(), return_command(), s390_unwind_pseudo_register(), sparc32_store_arguments(), sparc64_store_arguments(), thin_data_pntr(), unop_promote(), value_arg_coerce(), value_assign(), value_assign_to_component(), value_cast(), value_dynamic_cast(), value_fn_field(), value_literal_complex(), value_reinterpret_cast(), value_vector_widen(), varobj_create(), wrap_value_cast(), and xtensa_push_dummy_call().
struct value* value_cast_pointers | ( | struct type * | type, |
struct value * | arg2, | ||
int | subclass_check | ||
) | [read] |
Definition at line 309 of file valops.c.
References check_typedef(), coerce_ref(), deprecated_set_value_type(), gdb_assert, set_value_enclosing_type(), set_value_pointed_to_offset(), TYPE_CODE, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_TARGET_TYPE, value_addr(), value_cast_structs(), value_copy(), value_ind(), value_logical_not(), and value_type().
Referenced by ada_convert_actual(), evaluate_subexp_standard(), value_arg_coerce(), and value_cast().
static struct value* value_cast_structs | ( | struct type * | type, |
struct value * | v2 | ||
) | [static, read] |
Definition at line 222 of file valops.c.
References check_typedef(), gdb_assert, not_lval, search_struct_field(), TYPE_CODE, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_NAME, type_name_no_tag(), value_address(), value_at(), value_at_lazy(), value_embedded_offset(), value_full_object(), value_rtti_type(), value_type(), and value_zero().
Referenced by value_cast(), and value_cast_pointers().
struct value* value_coerce_array | ( | struct value * | arg1 | ) | [read] |
Definition at line 1473 of file valops.c.
References _, check_typedef(), error(), lookup_pointer_type(), lval_memory, TYPE_TARGET_TYPE, value_address(), value_coerce_to_target(), value_from_pointer(), VALUE_LVAL, and value_type().
Referenced by coerce_array(), lookup_child_selector(), lookup_objc_class(), typecmp(), value_cast(), value_nsstring(), value_subscript(), and wrap_value_coerce_array().
struct value* value_coerce_function | ( | struct value * | arg1 | ) | [read] |
Definition at line 1493 of file valops.c.
References _, error(), lookup_pointer_type(), lval_memory, value_address(), value_from_pointer(), VALUE_LVAL, and value_type().
Referenced by coerce_array(), value_addr(), and value_cast().
struct value* value_coerce_to_target | ( | struct value * | val | ) | [read] |
Definition at line 1435 of file valops.c.
References allocate_space_in_inferior(), check_typedef(), LONGEST, TYPE_LENGTH, value_at_lazy(), value_contents(), value_must_coerce_to_target(), value_type(), and write_memory().
Referenced by value_addr(), value_arg_coerce(), and value_coerce_array().
struct value* value_cstring | ( | char * | ptr, |
ssize_t | len, | ||
struct type * | char_type | ||
) | [read] |
Definition at line 1678 of file valops.c.
References allocate_value(), current_language, lookup_array_range_type(), memcpy(), language_defn::string_lower_bound, TYPE_LENGTH, and value_contents_raw().
Referenced by evaluate_subexp_c(), and value_of_internalvar().
struct value* value_dynamic_cast | ( | struct type * | type, |
struct value * | arg | ||
) | [read] |
Definition at line 727 of file valops.c.
References _, check_typedef(), class_types_same_p(), dynamic_cast_check_1(), dynamic_cast_check_2(), error(), is_ancestor(), is_public_ancestor(), is_unique_ancestor(), not_lval, TYPE_CODE, TYPE_CODE_CLASS, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_VOID, TYPE_TARGET_TYPE, value_addr(), value_address(), value_as_long(), value_at(), value_at_lazy(), value_cast(), value_contents_for_printing(), value_embedded_offset(), value_ind(), value_ref(), value_rtti_type(), value_type(), and value_zero().
Referenced by evaluate_subexp_standard().
static struct fn_field* value_find_oload_method_list | ( | struct value ** | argp, |
const char * | method, | ||
int | offset, | ||
int * | num_fns, | ||
struct type ** | basetype, | ||
int * | boffset | ||
) | [static, read] |
Definition at line 2340 of file valops.c.
References _, check_typedef(), coerce_array(), error(), find_method_list(), TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, value_ind(), and value_type().
Referenced by find_overload_match().
struct value* value_full_object | ( | struct value * | argp, |
struct type * | rtype, | ||
int | xfull, | ||
int | xtop, | ||
int | xusing_enc | ||
) | [read] |
Definition at line 3420 of file valops.c.
References _, deprecated_set_value_type(), lval_memory, set_value_embedded_offset(), set_value_enclosing_type(), TYPE_LENGTH, TYPE_NAME, value_address(), value_at_lazy(), value_copy(), value_embedded_offset(), value_enclosing_type(), VALUE_LVAL, value_rtti_type(), value_type(), and warning().
Referenced by c_value_print(), gnuv3_print_vtable(), readjust_indirect_value_type(), and value_cast_structs().
Definition at line 1570 of file valops.c.
References _, check_typedef(), coerce_array(), error(), find_function_addr(), lval_funcs::indirect, lval_computed, readjust_indirect_value_type(), TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_CODE_PTR, TYPE_TARGET_TYPE, value_as_address(), value_at_lazy(), value_computed_funcs(), value_enclosing_type(), VALUE_LVAL, value_pointed_to_offset(), and value_type().
Referenced by ada_coerce_to_simple_array(), ada_get_tsd_from_tag(), ada_tag_value_at_base_address(), ada_value_ind(), ada_value_ptr_subscript(), ada_value_struct_elt(), adjust_value_for_child_access(), c_describe_child(), c_value_print(), compute_exception(), decode_constrained_packed_array(), evaluate_subexp_java(), evaluate_subexp_modula2(), evaluate_subexp_standard(), find_overload_match(), gnuv2_virtual_fn_field(), gnuv3_get_typeid(), gnuv3_method_ptr_to_value(), gnuv3_print_vtable(), info_mach_region_command(), java_link_class_type(), java_value_print(), read_fat_string_value(), type_from_class(), value_cast_pointers(), value_dynamic_cast(), value_find_oload_method_list(), value_fn_field(), value_reinterpret_cast(), value_rtti_indirect_type(), value_struct_elt(), value_subscript(), value_user_defined_cpp_op(), and wrap_value_ind().
struct value* value_literal_complex | ( | struct value * | arg1, |
struct value * | arg2, | ||
struct type * | type | ||
) | [read] |
Definition at line 3593 of file valops.c.
References allocate_value(), memcpy(), TYPE_LENGTH, TYPE_TARGET_TYPE, value_cast(), value_contents(), and value_contents_raw().
Referenced by cast_into_complex(), and evaluate_subexp_standard().
static struct value* value_maybe_namespace_elt | ( | const struct type * | curtype, |
char * | name, | ||
int | want_address, | ||
enum noside noside | |||
) | [static, read] |
int value_must_coerce_to_target | ( | struct value * | val | ) |
Definition at line 1408 of file valops.c.
References check_typedef(), lval_internalvar, not_lval, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRING, TYPE_VECTOR, VALUE_LVAL, and value_type().
Referenced by value_assign(), and value_coerce_to_target().
static struct value* value_namespace_elt | ( | const struct type * | curtype, |
char * | name, | ||
int | want_address, | ||
enum noside noside | |||
) | [static, read] |
Referenced by value_aggregate_elt().
struct value* value_of_this | ( | const struct language_defn * | lang | ) | [read] |
Definition at line 3490 of file valops.c.
References _, error(), get_frame_block(), get_selected_frame(), language_defn::la_name_of_this, lookup_language_this(), and read_var_value().
Referenced by evaluate_subexp_standard(), and value_of_this_silent().
struct value* value_of_this_silent | ( | const struct language_defn * | lang | ) | [read] |
Definition at line 3515 of file valops.c.
References RETURN_MASK_ERROR, TRY_CATCH, and value_of_this().
struct value* value_of_variable | ( | struct symbol * | var, |
const struct block * | b | ||
) | [read] |
Definition at line 1330 of file valops.c.
References _, BLOCK_FUNCTION, block_inlined_p(), block_innermost_frame(), error(), get_selected_frame(), read_var_value(), SYMBOL_PRINT_NAME, and symbol_read_needs_frame().
Referenced by address_of_variable(), evaluate_subexp_standard(), find_function_in_inferior(), get_var_value(), info_common_command_for_block(), typy_template_argument(), value_static_field(), and value_user_defined_cpp_op().
Definition at line 855 of file valops.c.
References _, allocate_value(), check_typedef(), decimal_from_string(), error(), gdb_assert, gdbarch_byte_order(), get_array_bounds(), get_type_arch(), is_integral_type(), LONGEST, memcpy(), not_lval, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_DECFLOAT, TYPE_CODE_FLT, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_VECTOR, value_contents_all(), value_contents_writeable(), value_from_decfloat(), value_from_double(), value_from_longest(), VALUE_LVAL, and value_one().
Referenced by evaluate_subexp_standard(), and value_one().
Definition at line 1553 of file valops.c.
References check_typedef(), deprecated_set_value_type(), lookup_reference_type(), TYPE_CODE, TYPE_CODE_REF, value_addr(), and value_type().
Referenced by c_value_print(), typecmp(), value_arg_coerce(), value_cast(), value_dynamic_cast(), and value_reinterpret_cast().
struct value* value_reinterpret_cast | ( | struct type * | type, |
struct value * | arg | ||
) | [read] |
Definition at line 582 of file valops.c.
References _, check_typedef(), coerce_array(), error(), lookup_pointer_type(), type, TYPE_CODE, TYPE_CODE_INT, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHODPTR, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_TARGET_TYPE, value_addr(), value_cast(), value_ind(), value_ref(), and value_type().
Referenced by evaluate_subexp_standard().
struct value* value_repeat | ( | struct value * | arg1, |
int | count | ||
) | [read] |
Definition at line 1308 of file valops.c.
References _, allocate_repeat_value(), error(), lval_memory, read_value_memory(), set_value_address(), TYPE_LENGTH, value_address(), value_contents_all_raw(), value_enclosing_type(), VALUE_LVAL, and value_stack().
Referenced by evaluate_subexp_standard().
struct type* value_rtti_indirect_type | ( | struct value * | v, |
int * | full, | ||
int * | top, | ||
int * | using_enc | ||
) | [read] |
Definition at line 3371 of file valops.c.
References _, check_typedef(), coerce_ref(), internal_error(), lookup_pointer_type(), lookup_reference_type(), make_cv_type(), type, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CONST, TYPE_VOLATILE, value_ind(), value_rtti_type(), and value_type().
Referenced by c_value_print(), evaluate_subexp_standard(), value_actual_type(), and whatis_exp().
struct value* value_slice | ( | struct value * | array, |
int | lowbound, | ||
int | length | ||
) | [read] |
Definition at line 3533 of file valops.c.
References _, allocate_value(), allocate_value_lazy(), check_typedef(), create_array_type(), create_range_type(), error(), get_discrete_bounds(), LONGEST, lval_memory, set_value_component_location(), set_value_offset(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRING, TYPE_INDEX_TYPE, TYPE_LENGTH, TYPE_TARGET_TYPE, value_contents_copy(), VALUE_FRAME_ID, value_lazy(), VALUE_LVAL, value_offset(), and value_type().
Referenced by ada_value_slice(), evaluate_subexp_standard(), value_f90_subarray(), and wrap_value_slice().
struct value* value_string | ( | char * | ptr, |
ssize_t | len, | ||
struct type * | char_type | ||
) | [read] |
Definition at line 1701 of file valops.c.
References allocate_value(), current_language, lookup_string_range_type(), memcpy(), language_defn::string_lower_bound, TYPE_LENGTH, and value_contents_raw().
Referenced by evaluate_subexp_standard(), lookup_child_selector(), lookup_objc_class(), value_concat(), and value_nsstring().
struct value* value_struct_elt | ( | struct value ** | argp, |
struct value ** | args, | ||
const char * | name, | ||
int * | static_memfuncp, | ||
const char * | err | ||
) | [read] |
Definition at line 2173 of file valops.c.
References _, check_typedef(), coerce_array(), error(), NOT_FOUND_ERROR, search_struct_field(), search_struct_method(), throw_error(), TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_NFN_FIELDS, value_ind(), and value_type().
Referenced by desc_bounds(), desc_data(), desc_one_bound(), evaluate_subexp_java(), evaluate_subexp_modula2(), evaluate_subexp_opencl(), evaluate_subexp_standard(), get_java_utf8_name(), java_class_from_object(), java_class_is_primitive(), java_link_class_type(), java_value_print(), type_from_class(), value_user_defined_op(), and wrap_value_struct_elt().
static struct value* value_struct_elt_for_reference | ( | struct type * | domain, |
int | offset, | ||
struct type * | curtype, | ||
char * | name, | ||
struct type * | intype, | ||
int | want_address, | ||
enum noside noside | |||
) | [static, read] |
Referenced by value_aggregate_elt().
struct value* value_zero | ( | struct type * | type, |
enum lval_type | lv | ||
) | [read] |
Definition at line 844 of file valops.c.
References allocate_value(), lval_computed, not_lval, and VALUE_LVAL.
Referenced by cast_into_complex(), create_value(), dummy_frame_prev_register(), evaluate_subexp_java(), evaluate_subexp_modula2(), evaluate_subexp_opencl(), evaluate_subexp_standard(), execute_stack_op(), frame_unwind_got_address(), frame_unwind_got_bytes(), frame_unwind_got_constant(), value_cast(), value_cast_structs(), value_dynamic_cast(), value_x_binop(), and value_x_unop().
unsigned int overload_debug |
Definition at line 122 of file gdbtypes.c.
Referenced by _initialize_gdbtypes(), find_oload_champ(), and rank_one_type().
Definition at line 116 of file valops.c.
Referenced by evaluate_subexp_standard().