47 static int typecmp (
int staticp,
int varargs,
int nargs,
58 const char *,
const char *,
65 const char *,
const char *,
89 const char *,
int ,
enum noside);
108 static int auto_abandon = 0;
118 "C++ functions is %s.\n"),
132 if (sym.symbol != NULL)
136 error (
_(
"\"%s\" exists in this program but is not a function."),
150 if (msymbol.
minsym != NULL)
170 error (
_(
"evaluation of this expression " 171 "requires the target program to be active"));
173 error (
_(
"evaluation of this expression requires the " 174 "program to have a function \"%s\"."),
190 struct value *blocklen;
197 error (
_(
"No memory available to program now: " 198 "you need to start the target first"));
200 error (
_(
"No memory available to program: call to malloc failed"));
216 static struct value *
231 && !!
"Precondition is that type is of STRUCT or UNION kind.");
234 && !!
"Precondition is that value is of STRUCT or UNION kind");
260 struct type *real_type;
358 int convert_to_boolean = 0;
406 LONGEST low_bound, high_bound, new_length;
409 low_bound = 0, high_bound = 0;
410 new_length = val_length / element_length;
411 if (val_length % element_length != 0)
412 warning (
_(
"array element type size does not " 413 "divide object size in cast"));
419 new_length + low_bound - 1);
444 convert_to_boolean = 1;
501 (
LONGEST) (longest ? 1 : 0) : longest);
522 if (longest >= ((
LONGEST) 1 << addr_bit)
523 || longest <= -((
LONGEST) 1 << addr_bit))
546 error (
_(
"Cannot convert between vector values of different sizes"));
549 error (
_(
"can only cast scalar to vector of same size"));
569 error (
_(
"Invalid cast."));
579 struct value *result;
581 struct type *arg_type, *dest_type;
614 || (dest_code == arg_code
620 error (
_(
"Invalid reinterpret_cast"));
640 struct type *search_type,
642 struct type *arg_type,
643 struct value **result)
645 int i, result_count = 0;
655 if (address + embedded_offset +
offset >= arg_addr
661 address + embedded_offset +
offset);
688 struct type *search_type,
689 struct value **result)
691 int i, result_count = 0;
707 address + embedded_offset +
offset);
730 struct type *class_type, *rtti_type;
731 struct value *result, *tem, *original_arg = arg;
737 error (
_(
"Argument to dynamic_cast must be a pointer or reference type"));
740 error (
_(
"Argument to dynamic_cast must be pointer to class or `void *'"));
748 error (
_(
"Argument to dynamic_cast does not have pointer type"));
753 error (
_(
"Argument to dynamic_cast does " 754 "not have pointer to class type"));
766 error (
_(
"Argument to dynamic_cast does not have class type"));
779 error (
_(
"Ambiguous dynamic_cast"));
784 error (
_(
"Couldn't determine value's most derived type for dynamic_cast"));
832 rtti_type, &result) == 1)
841 error (
_(
"dynamic_cast failed"));
875 error (
_(
"Could not determine the vector bounds"));
878 for (i = 0; i < high_bound - low_bound + 1; i++)
887 error (
_(
"Not a numeric type."));
901 static struct value *
907 error (
_(
"Attempt to dereference a generic pointer."));
961 while (xfered_total < length)
968 buffer + xfered_total * unit_size, NULL,
969 memaddr + xfered_total,
970 length - xfered_total,
984 xfered_total += xfered_partial;
1000 error (
_(
"Left operand of assignment is not a modifiable lvalue."));
1079 if (changed_len > (
int)
sizeof (
LONGEST))
1080 error (
_(
"Can't handle bitfields which " 1081 "don't fit in a %d bit word."),
1118 error (
_(
"Value being assigned to is no longer active."));
1135 if (changed_len > (
int)
sizeof (
LONGEST))
1136 error (
_(
"Can't handle bitfields which " 1137 "don't fit in a %d bit word."),
1146 _(
"value has been optimized out"));
1149 _(
"value is not available"));
1187 if (funcs->
write != NULL)
1189 funcs->
write (toval, fromval);
1196 error (
_(
"Left operand of assignment is not an lvalue."));
1242 fieldval &= valmask;
1244 && (fieldval & (valmask ^ (valmask >> 1))))
1245 fieldval |= ~valmask;
1279 error (
_(
"Only values in memory can be extended with '@'."));
1281 error (
_(
"Invalid number %d of repetitions."), count);
1332 const char *regname;
1341 error (
_(
"Address requested for identifier " 1342 "\"%s\" which is in register $%s"),
1348 error (
_(
"Can't take address of \"%s\" which isn't an lvalue."),
1362 struct type *valtype;
1436 error (
_(
"Attempt to take address of value not located in memory."));
1448 struct value *retval;
1451 error (
_(
"Attempt to take address of value not located in memory."));
1480 struct type *enclosing_type
1482 struct type *enclosing_type_ptr
1500 error (
_(
"Attempt to take address of value not located in memory."));
1544 struct type *base_type;
1566 struct type *enc_type;
1589 error (
_(
"Attempt to take contents of a non-pointer value."));
1610 struct type *arraytype;
1615 nelem = highbound - lowbound + 1;
1618 error (
_(
"bad array bounds (%d, %d)"), lowbound, highbound);
1621 for (idx = 1; idx < nelem; idx++)
1626 error (
_(
"array elements must all be the same size"));
1631 lowbound, highbound);
1636 for (idx = 0; idx < nelem; idx++)
1646 for (idx = 0; idx < nelem; idx++)
1656 ssize_t highbound = len /
TYPE_LENGTH (char_type);
1657 struct type *stringtype
1679 ssize_t highbound = len /
TYPE_LENGTH (char_type);
1680 struct type *stringtype
1714 _(
"typecmp: no argument list"));
1725 struct type *tt1, *tt2;
1772 if (varargs || t2[i] == NULL)
1788 if (*result_ptr != NULL
1791 && *last_boffset != boffset)
1792 error (
_(
"base class '%s' is ambiguous in type '%s'"),
1795 *last_boffset = boffset;
1808 struct type *
type,
int looking_for_baseclass,
1809 struct value **result_ptr,
1811 struct type *outermost_type)
1819 if (!looking_for_baseclass)
1837 && t_field_name[0] ==
'\0')
1856 struct value *v = NULL;
1872 looking_for_baseclass, &v,
1884 for (i = 0; i < nbases; i++)
1886 struct value *v = NULL;
1891 int found_baseclass = (looking_for_baseclass
1923 error (
_(
"virtual baseclass botch"));
1932 if (found_baseclass)
1938 looking_for_baseclass,
1939 result_ptr, last_boffset,
1943 else if (found_baseclass)
1950 basetype, looking_for_baseclass,
1951 result_ptr, last_boffset,
1956 boffset,
name, outermost_type);
1967 static struct value *
1969 struct type *
type,
int looking_for_baseclass)
1971 struct value *result = NULL;
1975 &result, &boffset,
type);
1987 static struct value *
1990 int *static_memfuncp,
struct type *
type)
1994 int name_matched = 0;
1995 char dem_opname[64];
2007 if (cplus_demangle_opname (t_field_name, dem_opname, DMGL_ANSI))
2008 t_field_name = dem_opname;
2009 else if (cplus_demangle_opname (t_field_name, dem_opname, 0))
2010 t_field_name = dem_opname;
2019 if (j > 0 && args == 0)
2020 error (
_(
"cannot resolve overloaded method " 2021 "`%s': no arguments supplied"),
name);
2022 else if (j == 0 && args == 0)
2041 *static_memfuncp = 1;
2059 struct value *base_val;
2075 error (
_(
"virtual baseclass botch"));
2100 if (v == (
struct value *) - 1)
2112 return (
struct value *) - 1;
2134 const char *
name,
int *static_memfuncp,
const char *
err)
2156 error (
_(
"Attempt to extract a component of a value that is not a %s."),
2160 if (static_memfuncp)
2161 *static_memfuncp = 0;
2176 static_memfuncp, t);
2178 if (v == (
struct value *) - 1)
2179 error (
_(
"Cannot take address of method %s."),
name);
2183 error (
_(
"There is no member or method named %s."),
name);
2185 error (
_(
"There is no member named %s."),
name);
2191 static_memfuncp, t);
2193 if (v == (
struct value *) - 1)
2195 error (
_(
"One of the arguments you tried to pass to %s could not " 2196 "be converted to what the function wants."),
name);
2206 if (v && static_memfuncp)
2207 *static_memfuncp = 1;
2212 _(
"Structure has no component named %s."),
name);
2242 error (
_(
"Attempt to extract a component of a value that is not a %s."),
2253 error (
_(
"No field with matching bitpos and type."));
2284 struct fn_field **fn_list,
int *num_fns,
2292 gdb_assert (fn_list != NULL && xm_worker_vec != NULL);
2299 if ((*fn_list) == NULL)
2306 if (fn_field_name && (
strcmp_iw (fn_field_name, method) == 0))
2336 *xm_worker_vec = new_vec;
2360 xm_worker_vec, basetype, boffset);
2404 error (
_(
"Attempt to extract a component of a " 2405 "value that is not a struct or union"));
2407 gdb_assert (fn_list != NULL && xm_worker_vec != NULL);
2412 *xm_worker_vec = NULL;
2469 int *staticp,
const int no_adl,
2472 struct value *obj = (objp ? *objp : NULL);
2475 int func_oload_champ = -1;
2476 int method_oload_champ = -1;
2477 int src_method_oload_champ = -1;
2478 int ext_method_oload_champ = -1;
2486 struct value *temp = obj;
2490 struct symbol **oload_syms = NULL;
2495 struct type *basetype = NULL;
2500 const char *obj_type_name = NULL;
2501 const char *func_name = NULL;
2535 &xm_worker_vec, &basetype, &boffset);
2538 if (method ==
METHOD && (!fns_ptr || !num_fns) && !xm_worker_vec)
2539 error (
_(
"Couldn't find method %s%s%s"),
2541 (obj_type_name && *obj_type_name) ?
"::" :
"",
2551 num_fns, fns_ptr, NULL,
2552 NULL, &src_method_badness);
2555 (src_method_badness, nargs,
2564 0, NULL, xm_worker_vec,
2565 NULL, &ext_method_badness);
2572 if (src_method_oload_champ >= 0 && ext_method_oload_champ >= 0)
2586 if (ext_method_match_quality !=
STANDARD)
2588 method_oload_champ = src_method_oload_champ;
2589 method_badness = src_method_badness;
2590 ext_method_oload_champ = -1;
2591 method_match_quality = src_method_match_quality;
2596 method_oload_champ = ext_method_oload_champ;
2597 method_badness = ext_method_badness;
2598 src_method_oload_champ = -1;
2599 method_match_quality = ext_method_match_quality;
2602 method_oload_champ = src_method_oload_champ;
2603 method_badness = src_method_badness;
2604 ext_method_oload_champ = -1;
2605 method_match_quality = src_method_match_quality;
2613 else if (src_method_oload_champ >= 0)
2615 method_oload_champ = src_method_oload_champ;
2616 method_badness = src_method_badness;
2617 method_match_quality = src_method_match_quality;
2619 else if (ext_method_oload_champ >= 0)
2621 method_oload_champ = ext_method_oload_champ;
2622 method_badness = ext_method_badness;
2623 method_match_quality = ext_method_match_quality;
2629 const char *qualified_name = NULL;
2658 if (strcmp (temp, qualified_name) == 0)
2668 qualified_name =
name;
2674 if (func_name == NULL)
2688 if (func_oload_champ >= 0)
2696 if (method_oload_champ == -1 && func_oload_champ == -1)
2698 _(
"No symbol \"%s\" in current context."),
2704 if (method_oload_champ >= 0 && func_oload_champ >= 0)
2712 error (
_(
"Ambiguous overload resolution"));
2717 error (
_(
"Internal error: incompatible " 2718 "overload candidates proposed"));
2721 method_oload_champ = -1;
2722 match_quality = func_match_quality;
2725 func_oload_champ = -1;
2726 match_quality = method_match_quality;
2729 error (
_(
"Internal error: unexpected overload comparison result"));
2736 if (method_oload_champ >= 0)
2737 match_quality = method_match_quality;
2739 match_quality = func_match_quality;
2745 error (
_(
"Cannot resolve method %s%s%s to any overloaded instance"),
2747 (obj_type_name && *obj_type_name) ?
"::" :
"",
2750 error (
_(
"Cannot resolve function %s to any overloaded instance"),
2756 warning (
_(
"Using non-standard conversion to match " 2757 "method %s%s%s to supplied arguments"),
2759 (obj_type_name && *obj_type_name) ?
"::" :
"",
2762 warning (
_(
"Using non-standard conversion to match " 2763 "function %s to supplied arguments"),
2767 if (staticp != NULL)
2770 if (method_oload_champ >= 0)
2772 if (src_method_oload_champ >= 0)
2778 method_oload_champ, basetype,
2789 ext_method_oload_champ)));
2793 *symp = oload_syms[func_oload_champ];
2811 switch (match_quality)
2832 const char *func_name,
2833 const char *qualified_name,
2834 struct symbol ***oload_syms,
2843 oload_syms, oload_champ_bv,
2861 const char *func_name,
2862 const char *qualified_name,
2864 struct symbol ***oload_syms,
2869 int next_namespace_len = namespace_len;
2870 int searched_deeper = 0;
2873 int new_oload_champ;
2874 struct symbol **new_oload_syms;
2876 char *new_namespace;
2878 if (next_namespace_len != 0)
2880 gdb_assert (qualified_name[next_namespace_len] ==
':');
2881 next_namespace_len += 2;
2883 next_namespace_len +=
2888 *oload_champ_bv = NULL;
2893 if (qualified_name[next_namespace_len] ==
':')
2895 searched_deeper = 1;
2898 func_name, qualified_name,
2900 oload_syms, oload_champ_bv,
2901 oload_champ, no_adl))
2917 new_namespace = (
char *) alloca (namespace_len + 1);
2918 strncpy (new_namespace, qualified_name, namespace_len);
2919 new_namespace[namespace_len] =
'\0';
2925 if (!searched_deeper && !no_adl)
2928 struct type **arg_types;
2931 arg_types = (
struct type **)
2932 alloca (nargs * (
sizeof (
struct type *)));
2933 for (ix = 0; ix < nargs; ix++)
2938 while (new_oload_syms[num_fns])
2942 NULL, NULL, new_oload_syms,
2943 &new_oload_champ_bv);
2952 if (new_oload_champ != -1
2955 *oload_syms = new_oload_syms;
2956 *oload_champ = new_oload_champ;
2957 *oload_champ_bv = new_oload_champ_bv;
2961 else if (searched_deeper)
2963 xfree (new_oload_syms);
2964 xfree (new_oload_champ_bv);
2970 *oload_syms = new_oload_syms;
2971 *oload_champ = new_oload_champ;
2972 *oload_champ_bv = new_oload_champ_bv;
2994 int num_fns,
struct fn_field *fns_ptr,
2996 struct symbol **oload_syms,
3004 int oload_champ = -1;
3006 int oload_ambiguous = 0;
3012 gdb_assert ((fns_ptr != NULL) + (oload_syms != NULL) + (xm_worker_vec != NULL)
3015 *oload_champ_bv = NULL;
3017 fn_count = (xm_worker_vec != NULL
3021 for (ix = 0; ix < fn_count; ix++)
3024 int static_offset = 0;
3026 struct type **parm_types;
3029 if (xm_worker_vec != NULL)
3036 if (fns_ptr != NULL)
3045 for (jj = 0; jj < nparms; jj++)
3046 parm_types[jj] = (fns_ptr != NULL
3055 args + static_offset,
3056 nargs - static_offset);
3058 if (!*oload_champ_bv)
3060 *oload_champ_bv = bv;
3068 oload_ambiguous = 1;
3071 oload_ambiguous = 2;
3074 *oload_champ_bv = bv;
3075 oload_ambiguous = 0;
3085 if (fns_ptr != NULL)
3087 "Overloaded method instance %s, # of parms %d\n",
3088 fns_ptr[ix].physname, nparms);
3089 else if (xm_worker_vec != NULL)
3091 "Xmethod worker, # of parms %d\n",
3095 "Overloaded function instance " 3096 "%s # of parms %d\n",
3099 for (jj = 0; jj < nargs - static_offset; jj++)
3101 "...Badness @ %d : %d\n",
3104 "champion is %d, ambiguous? %d\n",
3105 oload_champ, oload_ambiguous);
3134 for (ix = 1; ix <= nargs - static_offset; ix++)
3165 const char *cp = strchr (dname,
'<');
3170 len = strlen (dname);
3173 if (strlen (
name + 1) != len || strncmp (dname,
name + 1, len) != 0)
3174 error (
_(
"name of destructor must equal name of class"));
3185 static struct value *
3189 int name_len = strlen (
name);
3205 len = strlen (fname);
3206 if (len + 2 >= name_len
3207 && fname[len - name_len - 2] ==
':' 3208 && fname[len - name_len - 1] ==
':' 3209 && strcmp (&fname[len - name_len],
name) == 0)
3213 error (
_(
"no constant named \"%s\" in enum \"%s\""),
3225 struct type *expect_type,
int want_address,
3244 _(
"non-aggregate type in value_aggregate_elt"));
3267 if (skip_artificial)
3307 static struct value *
3309 struct type *curtype,
const char *
name,
3310 struct type *intype,
3314 struct type *t = curtype;
3316 struct value *v, *result;
3320 error (
_(
"Internal error: non-aggregate type " 3321 "to value_struct_elt_for_reference"));
3327 if (t_field_name && strcmp (t_field_name,
name) == 0)
3337 error (
_(
"pointers to bitfield members not allowed"));
3370 error (
_(
"Cannot reference non-static field \"%s\""),
name);
3385 char dem_opname[64];
3391 if (cplus_demangle_opname (t_field_name,
3392 dem_opname, DMGL_ANSI))
3393 t_field_name = dem_opname;
3394 else if (cplus_demangle_opname (t_field_name,
3396 t_field_name = dem_opname;
3398 if (t_field_name && strcmp (t_field_name,
name) == 0)
3408 for (j = 0; j < len; ++j)
3422 error (
_(
"no member function matches " 3423 "that type instantiation"));
3430 for (ii = 0; ii < len; ++ii)
3448 error (
_(
"non-unique member `%s' requires " 3449 "type instantiation"),
name);
3455 error (
_(
"no matching member function"));
3486 error (
_(
"Cannot reference virtual member function \"%s\""),
3541 static struct value *
3543 const char *
name,
int want_address,
3551 error (
_(
"No symbol \"%s\" in namespace \"%s\"."),
3563 static struct value *
3565 const char *
name,
int want_address,
3570 struct value *result;
3598 struct value *target = NULL;
3599 struct type *
type, *real_type, *target_type;
3664 int xfull,
int xtop,
3667 struct type *real_type;
3671 struct value *new_val;
3678 using_enc = xusing_enc;
3707 warning (
_(
"Couldn't retrieve complete object of RTTI " 3708 "type %s; object may be in register(s)."),
3735 const struct block *b;
3739 error (
_(
"no `this' in current language"));
3747 error (
_(
"current stack frame does not contain a variable named `%s'"),
3759 struct value *ret = NULL;
3781 LONGEST lowerbound, upperbound;
3782 struct value *slice;
3783 struct type *array_type;
3788 error (
_(
"cannot take slice of non-array"));
3792 error (
_(
"slice from bad array or bitstring"));
3794 if (lowbound < lowerbound ||
length < 0
3795 || lowbound +
length - 1 > upperbound)
3796 error (
_(
"slice out of range"));
3858 static struct value *
3883 error (
_(
"cannot cast non-number to complex"));
3891 Set overload resolution in evaluating C++ functions."),
_(
"\ 3892 Show overload resolution in evaluating C++ functions."),
const struct rank INCOMPATIBLE_TYPE_BADNESS
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t err
struct frame_info * frame_find_by_id(struct frame_id id)
struct value * value_virtual_fn_field(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
struct value * value_zero(struct type *type, enum lval_type lv)
struct type * value_rtti_type(struct value *v, int *full, LONGEST *top, int *using_enc)
#define VEC_merge(T, V1, V2)
struct value * value_array(int lowbound, int highbound, struct value **elemvec)
static struct value * value_namespace_elt(const struct type *, const char *, int, enum noside)
struct type * lookup_string_range_type(struct type *string_char_type, LONGEST low_bound, LONGEST high_bound)
struct type * lookup_array_range_type(struct type *element_type, LONGEST low_bound, LONGEST high_bound)
void set_value_embedded_offset(struct value *value, LONGEST val)
void mark_value_bits_unavailable(struct value *value, LONGEST offset, LONGEST length)
static struct value * cast_into_complex(struct type *, struct value *)
struct value * value_addr(struct value *arg1)
struct type * lookup_reference_type(struct type *type, enum type_code refcode)
struct frame_info * get_selected_frame(const char *message)
#define VALUE_FRAME_ID(val)
static int typecmp(int staticp, int varargs, int nargs, struct field t1[], struct value *t2[])
struct type * create_static_range_type(struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
struct value * value_aggregate_elt(struct type *curtype, const char *name, struct type *expect_type, int want_address, enum noside noside)
const struct rank NS_POINTER_CONVERSION_BADNESS
#define SYMBOL_PRINT_NAME(symbol)
static int find_oload_champ(struct value **, int, int, struct fn_field *, VEC(xmethod_worker_ptr) *, struct symbol **, struct badness_vector **)
struct value * value_from_contents_and_address(struct type *type, const gdb_byte *valaddr, CORE_ADDR address)
#define TYPE_FIELD_NAME(thistype, n)
#define TYPE_N_BASECLASSES(thistype)
unsigned int overload_debug
struct value * value_struct_elt_bitpos(struct value **argp, int bitpos, struct type *ftype, const char *err)
void set_internalvar_component(struct internalvar *var, LONGEST offset, LONGEST bitpos, LONGEST bitsize, struct value *newval)
int strcmp_iw(const char *string1, const char *string2)
#define TYPE_NFN_FIELDS(thistype)
struct value * value_reinterpret_cast(struct type *type, struct value *arg)
LONGEST value_as_long(struct value *val)
const char * type_name_no_tag_or_error(struct type *type)
#define BMSYMBOL_VALUE_ADDRESS(symbol)
void warning(const char *fmt,...)
#define VALUE_NEXT_FRAME_ID(val)
void observer_notify_register_changed(struct frame_info *frame, int regnum)
LONGEST value_embedded_offset(const struct value *value)
struct type * create_array_type(struct type *result_type, struct type *element_type, struct type *range_type)
struct value * value_coerce_array(struct value *arg1)
#define TYPE_NAME(thistype)
struct value * address_of_variable(struct symbol *var, const struct block *b)
struct value * value_of_this_silent(const struct language_defn *lang)
#define TYPE_FIELD_ARTIFICIAL(thistype, n)
LONGEST value_bitsize(const struct value *value)
int deprecated_value_modifiable(const struct value *value)
struct type * value_enclosing_type(const struct value *value)
struct value * value_at(struct type *type, CORE_ADDR addr)
char * cp_func_name(const char *full_name)
void put_frame_register_bytes(struct frame_info *frame, int regnum, CORE_ADDR offset, int len, const gdb_byte *myaddr)
struct block_symbol cp_lookup_symbol_namespace(const char *scope, const char *name, const struct block *block, const domain_enum domain)
struct value * allocate_value_lazy(struct type *type)
void select_frame(struct frame_info *fi)
#define SYMBOL_CLASS(symbol)
void internal_error(const char *file, int line, const char *fmt,...)
#define BASETYPE_VIA_VIRTUAL(thistype, index)
#define VALUE_INTERNALVAR(val)
unsigned int type_length_units(struct type *type)
int value_lazy(const struct value *value)
struct value * value_coerce_function(struct value *arg1)
void target_float_convert(const gdb_byte *from, const struct type *from_type, gdb_byte *to, const struct type *to_type)
struct value * coerce_ref(struct value *arg)
#define TYPE_FN_FIELD_STATIC_P(thisfn, n)
void read_value_memory(struct value *val, LONGEST bit_offset, int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length)
int baseclass_offset(struct type *type, int index, const gdb_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val)
void set_value_lazy(struct value *value, int val)
struct value * value_ind(struct value *arg1)
struct value * value_copy(struct value *arg)
struct value * value_of_this(const struct language_defn *lang)
static int find_oload_champ_namespace(struct value **, int, const char *, const char *, struct symbol ***, struct badness_vector **, const int no_adl)
struct block_symbol lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
int is_public_ancestor(struct type *base, struct type *dclass)
static int dynamic_cast_check_1(struct type *desired_type, const gdb_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, struct value *val, struct type *search_type, CORE_ADDR arg_addr, struct type *arg_type, struct value **result)
const gdb_byte * value_contents_for_printing(struct value *value)
#define TYPE_FIELD(thistype, n)
#define TYPE_FN_FIELD_ARGS(thisfn, n)
#define TYPE_FIELD_ENUMVAL(thistype, n)
#define TYPE_FIELD_TYPE(thistype, n)
static void update_search_result(struct value **result_ptr, struct value *v, LONGEST *last_boffset, LONGEST boffset, const char *name, struct type *type)
struct value * allocate_value(struct type *type)
static struct value * enum_constant_from_type(struct type *type, const char *name)
struct objfile * symbol_objfile(const struct symbol *symbol)
static int oload_method_static_p(struct fn_field *, int)
#define TYPE_FN_FIELD_VOLATILE(thisfn, n)
int gdbarch_convert_register_p(struct gdbarch *gdbarch, int regnum, struct type *type)
int value_stack(const struct value *value)
const char * la_name_of_this
static struct value * search_struct_field(const char *, struct value *, struct type *, int)
#define TYPE_IS_REFERENCE(t)
static int compare_parameters(struct type *t1, struct type *t2, int skip_artificial)
const struct rank EXACT_MATCH_BADNESS
void deprecated_set_value_type(struct value *value, struct type *type)
struct symbol ** make_symbol_overload_list_adl(struct type **arg_types, int nargs, const char *func_name)
void set_value_address(struct value *value, CORE_ADDR addr)
struct cleanup * all_cleanups(void)
int gdbarch_addressable_memory_unit_size(struct gdbarch *gdbarch)
LONGEST value_offset(const struct value *value)
void null_cleanup(void *arg)
void memory_error(enum target_xfer_status err, CORE_ADDR memaddr)
struct cmd_list_element * setlist
struct value * value_struct_elt(struct value **argp, struct value **args, const char *name, int *static_memfuncp, const char *err)
#define TYPE_FN_FIELD_PHYSNAME(thisfn, n)
struct frame_id get_frame_id(struct frame_info *fi)
struct type * check_typedef(struct type *type)
#define TYPE_FN_FIELD_VIRTUAL_P(thisfn, n)
const gdb_byte * value_contents(struct value *value)
static int dynamic_cast_check_2(struct type *desired_type, const gdb_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, struct value *val, struct type *search_type, struct value **result)
#define CATCH(EXCEPTION, MASK)
struct type * lookup_memberptr_type(struct type *type, struct type *domain)
struct target_ops current_target
#define TYPE_FN_FIELD_ARTIFICIAL(thisfn, n)
int field_is_static(struct field *f)
struct value * value_static_field(struct type *type, int fieldno)
struct symbol ** make_symbol_overload_list(const char *func_name, const char *the_namespace)
int compare_badness(struct badness_vector *a, struct badness_vector *b)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
#define SYMBOL_DEMANGLED_NAME(symbol)
void cplus_make_method_ptr(struct type *type, gdb_byte *contents, CORE_ADDR value, int is_virtual)
struct value * read_var_value(struct symbol *var, const struct block *var_block, struct frame_info *frame)
struct value * find_function_in_inferior(const char *name, struct objfile **objf_p)
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
unsigned int cp_find_first_component(const char *name)
const struct block * block
const struct block * get_frame_block(struct frame_info *frame, CORE_ADDR *addr_in_block)
struct value * value_cast_pointers(struct type *type, struct value *arg2, int subclass_check)
void(* write)(struct value *toval, struct value *fromval)
void set_value_enclosing_type(struct value *val, struct type *new_encl_type)
int symbol_read_needs_frame(struct symbol *sym)
int is_ancestor(struct type *base, struct type *dclass)
struct cmd_list_element * showlist
const gdb_byte * value_contents_all(struct value *value)
#define gdb_assert_not_reached(message)
int is_integral_type(struct type *t)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
void set_internalvar(struct internalvar *var, struct value *val)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
struct frame_info * deprecated_safe_get_selected_frame(void)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
struct value * value_coerce_to_target(struct value *val)
struct value * value_of_xmethod(struct xmethod_worker *worker)
#define VALUE_REGNUM(val)
#define VEC_index(T, V, I)
struct gdbarch * get_type_arch(const struct type *type)
gdb_byte * value_contents_writeable(struct value *value)
struct value * coerce_array(struct value *arg)
struct value * value_assign(struct value *toval, struct value *fromval)
struct value * value_from_longest(struct type *type, LONGEST num)
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
static int startswith(const char *string, const char *pattern)
struct value * value_at_lazy(struct type *type, CORE_ADDR addr)
void free_xmethod_worker_vec(void *vec)
struct value * value_cast(struct type *type, struct value *arg2)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
#define target_has_execution
gdb_byte * value_contents_all_raw(struct value *value)
int class_types_same_p(const struct type *a, const struct type *b)
void set_value_offset(struct value *value, LONGEST offset)
#define TYPE_BASECLASS(thistype, index)
#define TYPE_FIELD_PACKED(thistype, n)
LONGEST value_bitpos(const struct value *value)
struct value * value_dynamic_cast(struct type *type, struct value *arg)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
#define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype)
struct badness_vector * rank_function(struct type **parms, int nparms, struct value **args, int nargs)
static struct value * value_cast_structs(struct type *type, struct value *v2)
static struct value * value_struct_elt_for_reference(struct type *, int, struct type *, const char *, struct type *, int, enum noside)
static const char * namespace_name(struct die_info *die, int *is_anonymous, struct dwarf2_cu *)
struct value * value_full_object(struct value *argp, struct type *rtype, int xfull, int xtop, int xusing_enc)
struct value * value_of_internalvar(struct gdbarch *gdbarch, struct internalvar *var)
#define TYPE_FIELD_BITPOS(thistype, n)
int destructor_name_p(const char *name, struct type *type)
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, const enum noside noside)
static void show_overload_resolution(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
int value_must_coerce_to_target(struct value *val)
struct value *(* indirect)(struct value *value)
#define TYPE_FN_FIELD_VOFFSET(thisfn, n)
struct value * value_fn_field(struct value **arg1p, struct fn_field *f, int j, struct type *type, LONGEST offset)
struct value * value_ref(struct value *arg1, enum type_code refcode)
int value_bits_synthetic_pointer(const struct value *value, LONGEST offset, LONGEST length)
void throw_exception(struct gdb_exception exception)
int is_floating_type(struct type *t)
int types_equal(struct type *a, struct type *b)
#define TYPE_FN_FIELD_TYPE(thisfn, n)
struct value * allocate_repeat_value(struct type *type, int count)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
xmethod_worker_vec * get_matching_xmethod_workers(struct type *, const char *)
struct type * make_cv_type(int cnst, int voltl, struct type *type, struct type **typeptr)
void discard_cleanups(struct cleanup *old_chain)
void observer_notify_target_changed(struct target_ops *target)
const struct language_defn * current_language
#define TYPE_TARGET_TYPE(thistype)
void value_fetch_lazy(struct value *val)
void gdbarch_value_to_register(struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
#define TYPE_CODE(thistype)
struct rank rank_one_type(struct type *parm, struct type *arg, struct value *value)
#define TYPE_INDEX_TYPE(type)
#define TYPE_BASECLASS_NAME(thistype, index)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
struct value * value_of_variable(struct symbol *var, const struct block *b)
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type)
void value_contents_copy(struct value *dst, LONGEST dst_offset, struct value *src, LONGEST src_offset, LONGEST length)
struct minimal_symbol * minsym
static void find_method_list(struct value **, const char *, LONGEST, struct type *, struct fn_field **, int *, VEC(xmethod_worker_ptr) **, struct type **, LONGEST *)
struct value * value_repeat(struct value *arg1, int count)
static struct value * search_struct_method(const char *, struct value **, struct value **, LONGEST, int *, struct type *)
static CORE_ADDR allocate_space_in_inferior(int)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct bound_minimal_symbol lookup_bound_minimal_symbol(const char *name)
#define TYPE_NFIELDS(thistype)
static enum oload_classification classify_oload_match(struct badness_vector *, int, int)
void set_value_pointed_to_offset(struct value *value, LONGEST val)
struct value * value_one(struct type *type)
#define TYPE_FN_FIELD_CONST(thisfn, n)
LONGEST value_pointed_to_offset(const struct value *value)
int value_logical_not(struct value *arg1)
void check_stub_method_group(struct type *type, int method_id)
#define TYPE_TAG_NAME(type)
struct block_symbol lookup_language_this(const struct language_defn *lang, const struct block *block)
gdb::def_vector< gdb_byte > byte_vector
static struct value * get_value_at(struct type *type, CORE_ADDR addr, int lazy)
const struct block * get_selected_block(CORE_ADDR *addr_in_block)
struct value * value_string(const char *ptr, ssize_t len, struct type *char_type)
int get_frame_register_bytes(struct frame_info *frame, int regnum, CORE_ADDR offset, int len, gdb_byte *myaddr, int *optimizedp, int *unavailablep)
const struct lval_funcs * funcs
void _initialize_valops(void)
#define SYMBOL_NATURAL_NAME(symbol)
struct value * value_parent(const struct value *value)
unsigned long long ULONGEST
#define BASETYPE_VIA_PUBLIC(thistype, index)
target_xfer_partial_ftype target_xfer_partial
struct value * call_function_by_hand(struct value *function, type *default_return_type, int nargs, struct value **args)
struct value * value_allocate_space_in_inferior(int len)
struct value * value_slice(struct value *array, int lowbound, int length)
struct value * value_primitive_field(struct value *arg1, LONGEST offset, int fieldno, struct type *arg_type)
struct type * value_type(const struct value *value)
#define SYMBOL_TYPE(symbol)
struct value * value_from_ulongest(struct type *type, ULONGEST num)
struct type ** get_xmethod_arg_types(struct xmethod_worker *worker, int *nargs)
CORE_ADDR value_as_address(struct value *val)
int is_unique_ancestor(struct type *base, struct value *val)
struct type * lookup_methodptr_type(struct type *to_type)
gdb_byte * value_contents_raw(struct value *value)
static struct value * value_maybe_namespace_elt(const struct type *, const char *, int, enum noside)
#define TYPE_FN_FIELDLIST_NAME(thistype, n)
const char * type_name_no_tag(const struct type *type)
#define TYPE_LENGTH(thistype)
#define TYPE_BASECLASS_BITPOS(thistype, index)
struct value * value_literal_complex(struct value *arg1, struct value *arg2, struct type *type)
struct value * readjust_indirect_value_type(struct value *value, struct type *enc_type, const struct type *original_type, const struct value *original_value)
#define TYPE_FN_FIELDLIST_LENGTH(thistype, n)
int compare_ranks(struct rank a, struct rank b)
struct value * value_cstring(const char *ptr, ssize_t len, struct type *char_type)
struct gdbarch * get_value_arch(const struct value *value)
void write_memory_with_notification(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
struct xmethod_worker * clone_xmethod_worker(struct xmethod_worker *worker)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
#define TYPE_FIELD_LOC_KIND(thistype, n)
#define TYPE_DECLARED_CLASS(t)
CORE_ADDR value_address(const struct value *value)
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)
int get_array_bounds(struct type *type, LONGEST *low_bound, LONGEST *high_bound)
int get_discrete_bounds(struct type *type, LONGEST *lowp, LONGEST *highp)
static void do_search_struct_field(const char *name, struct value *arg1, LONGEST offset, struct type *type, int looking_for_baseclass, struct value **result_ptr, LONGEST *last_boffset, struct type *outermost_type)
#define TYPE_SELF_TYPE(thistype)
void error(const char *fmt,...)
struct type * lookup_pointer_type(struct type *type)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
#define TYPE_FN_FIELDLIST1(thistype, n)
void throw_error(enum errors error, const char *fmt,...)
struct target_ops * beneath
bool is_floating_value(struct value *val)
void do_cleanups(struct cleanup *old_chain)
void set_value_component_location(struct value *component, const struct value *whole)
struct type * lookup_function_type(struct type *type)
#define TYPE_SAFE_NAME(type)
void modify_field(struct type *type, gdb_byte *addr, LONGEST fieldval, LONGEST bitpos, LONGEST bitsize)
struct type * value_rtti_indirect_type(struct value *v, int *full, LONGEST *top, int *using_enc)
static void value_find_oload_method_list(struct value **argp, const char *method, LONGEST offset, struct fn_field **fn_list, int *num_fns, VEC(xmethod_worker_ptr) **xm_worker_vec, struct type **basetype, LONGEST *boffset)
const struct lval_funcs * value_computed_funcs(const struct value *v)