46 static int typecmp (
int staticp,
int varargs,
int nargs,
54 int,
int *,
struct type *);
57 const char *,
const char *,
64 const char *,
const char *,
88 const char *,
int ,
enum noside);
99 int,
struct type *,
struct fn_field **,
int *,
101 struct type **,
int *);
109 static int auto_abandon = 0;
112 int overload_resolution = 0;
119 "C++ functions is %s.\n"),
137 error (
_(
"\"%s\" exists in this program but is not a function."),
151 if (msymbol.
minsym != NULL)
171 error (
_(
"evaluation of this expression "
172 "requires the target program to be active"));
174 error (
_(
"evaluation of this expression requires the "
175 "program to have a function \"%s\"."),
191 struct value *blocklen;
198 error (
_(
"No memory available to program now: "
199 "you need to start the target first"));
201 error (
_(
"No memory available to program: call to malloc failed"));
217 static struct value *
232 && !!
"Precondition is that type is of STRUCT or UNION kind.");
235 && !!
"Precondition is that value is of STRUCT or UNION kind");
259 int full, top, using_enc;
260 struct type *real_type;
358 int convert_to_boolean = 0;
405 LONGEST low_bound, high_bound, new_length;
408 low_bound = 0, high_bound = 0;
409 new_length = val_length / element_length;
410 if (val_length % element_length != 0)
411 warning (
_(
"array element type size does not "
412 "divide object size in cast"));
418 new_length + low_bound - 1);
443 convert_to_boolean = 1;
476 byte_order, dec, dec_len, byte_order);
503 (
LONGEST) (longest ? 1 : 0) : longest);
524 if (longest >= ((
LONGEST) 1 << addr_bit)
525 || longest <= -((
LONGEST) 1 << addr_bit))
548 error (
_(
"Cannot convert between vector values of different sizes"));
551 error (
_(
"can only cast scalar to vector of same size"));
571 error (
_(
"Invalid cast."));
581 struct value *result;
583 struct type *arg_type, *dest_type;
616 || (dest_code == arg_code
622 error (
_(
"Invalid reinterpret_cast"));
641 struct type *search_type,
643 struct type *arg_type,
644 struct value **result)
646 int i, result_count = 0;
655 if (address + embedded_offset + offset >= arg_addr
656 && address + embedded_offset + offset < arg_addr +
TYPE_LENGTH (arg_type))
661 address + embedded_offset + offset);
667 embedded_offset + offset,
688 struct type *search_type,
689 struct value **result)
691 int i, result_count = 0;
707 address + embedded_offset + offset);
712 embedded_offset + offset,
726 int full, top, using_enc;
729 struct type *class_type, *rtti_type;
730 struct value *result, *tem, *original_arg = arg;
736 error (
_(
"Argument to dynamic_cast must be a pointer or reference type"));
739 error (
_(
"Argument to dynamic_cast must be pointer to class or `void *'"));
747 error (
_(
"Argument to dynamic_cast does not have pointer type"));
752 error (
_(
"Argument to dynamic_cast does "
753 "not have pointer to class type"));
765 error (
_(
"Argument to dynamic_cast does not have class type"));
778 error (
_(
"Ambiguous dynamic_cast"));
783 error (
_(
"Couldn't determine value's most derived type for dynamic_cast"));
813 value_embedded_offset (tem),
827 value_embedded_offset (tem),
829 rtti_type, &result) == 1)
836 error (
_(
"dynamic_cast failed"));
882 error (
_(
"Could not determine the vector bounds"));
885 for (i = 0; i < high_bound - low_bound + 1; i++)
894 error (
_(
"Not a numeric type."));
908 static struct value *
914 error (
_(
"Attempt to dereference a generic pointer."));
963 while (xfered < length)
970 buffer + xfered, NULL,
971 memaddr + xfered, length - xfered,
984 xfered += xfered_len;
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."),
1111 error (
_(
"Value being assigned to is no longer active."));
1128 if (changed_len > (
int)
sizeof (
LONGEST))
1129 error (
_(
"Can't handle bitfields which "
1130 "don't fit in a %d bit word."),
1139 _(
"value has been optimized out"));
1142 _(
"value is not available"));
1182 if (funcs->
write != NULL)
1184 funcs->
write (toval, fromval);
1191 error (
_(
"Left operand of assignment is not an lvalue."));
1237 fieldval &= valmask;
1239 && (fieldval & (valmask ^ (valmask >> 1))))
1240 fieldval |= ~valmask;
1274 error (
_(
"Only values in memory can be extended with '@'."));
1276 error (
_(
"Invalid number %d of repetitions."), count);
1306 error (
_(
"No frame is currently executing in block %s."),
1309 error (
_(
"No frame is currently executing in specified block"));
1342 const char *regname;
1351 error (
_(
"Address requested for identifier "
1352 "\"%s\" which is in register $%s"),
1358 error (
_(
"Can't take address of \"%s\" which isn't an lvalue."),
1372 struct type *valtype;
1446 error (
_(
"Attempt to take address of value not located in memory."));
1458 struct value *retval;
1461 error (
_(
"Attempt to take address of value not located in memory."));
1495 error (
_(
"Attempt to take address of value not located in memory."));
1535 struct type *base_type;
1557 struct type *enc_type;
1580 error (
_(
"Attempt to take contents of a non-pointer value."));
1599 unsigned int typelength;
1601 struct type *arraytype;
1606 nelem = highbound - lowbound + 1;
1609 error (
_(
"bad array bounds (%d, %d)"), lowbound, highbound);
1612 for (idx = 1; idx < nelem; idx++)
1616 error (
_(
"array elements must all be the same size"));
1621 lowbound, highbound);
1626 for (idx = 0; idx < nelem; idx++)
1636 for (idx = 0; idx < nelem; idx++)
1646 ssize_t highbound = len /
TYPE_LENGTH (char_type);
1647 struct type *stringtype
1669 ssize_t highbound = len /
TYPE_LENGTH (char_type);
1670 struct type *stringtype
1704 _(
"typecmp: no argument list"));
1715 struct type *tt1, *tt2;
1763 if (varargs || t2[i] == NULL)
1774 int *last_boffset,
int boffset,
1775 const char *
name,
struct type *type)
1779 if (*result_ptr != NULL
1782 && *last_boffset != boffset)
1783 error (
_(
"base class '%s' is ambiguous in type '%s'"),
1786 *last_boffset = boffset;
1799 struct type *type,
int looking_for_baseclass,
1800 struct value **result_ptr,
1802 struct type *outermost_type)
1810 if (!looking_for_baseclass)
1815 if (t_field_name && (
strcmp_iw (t_field_name, name) == 0))
1828 && t_field_name[0] ==
'\0')
1847 struct value *v = NULL;
1863 looking_for_baseclass, &v,
1875 for (i = 0; i < nbases; i++)
1877 struct value *v = NULL;
1882 int found_baseclass = (looking_for_baseclass
1914 error (
_(
"virtual baseclass botch"));
1923 if (found_baseclass)
1929 looking_for_baseclass,
1930 result_ptr, last_boffset,
1934 else if (found_baseclass)
1941 basetype, looking_for_baseclass,
1942 result_ptr, last_boffset,
1947 boffset, name, outermost_type);
1958 static struct value *
1960 struct type *type,
int looking_for_baseclass)
1962 struct value *result = NULL;
1966 &result, &boffset, type);
1978 static struct value *
1980 struct value **args,
int offset,
1981 int *static_memfuncp,
struct type *type)
1985 int name_matched = 0;
1986 char dem_opname[64];
1998 if (cplus_demangle_opname (t_field_name, dem_opname, DMGL_ANSI))
1999 t_field_name = dem_opname;
2000 else if (cplus_demangle_opname (t_field_name, dem_opname, 0))
2001 t_field_name = dem_opname;
2003 if (t_field_name && (
strcmp_iw (t_field_name, name) == 0))
2010 if (j > 0 && args == 0)
2011 error (
_(
"cannot resolve overloaded method "
2012 "`%s': no arguments supplied"), name);
2013 else if (j == 0 && args == 0)
2032 *static_memfuncp = 1;
2050 struct value *base_val;
2069 error (
_(
"virtual baseclass botch"));
2095 if (v == (
struct value *) - 1)
2107 return (
struct value *) - 1;
2129 const char *
name,
int *static_memfuncp,
const char *
err)
2151 error (
_(
"Attempt to extract a component of a value that is not a %s."),
2155 if (static_memfuncp)
2156 *static_memfuncp = 0;
2171 static_memfuncp, t);
2173 if (v == (
struct value *) - 1)
2174 error (
_(
"Cannot take address of method %s."), name);
2178 error (
_(
"There is no member or method named %s."), name);
2180 error (
_(
"There is no member named %s."), name);
2186 static_memfuncp, t);
2188 if (v == (
struct value *) - 1)
2190 error (
_(
"One of the arguments you tried to pass to %s could not "
2191 "be converted to what the function wants."), name);
2201 if (v && static_memfuncp)
2202 *static_memfuncp = 1;
2207 _(
"Structure has no component named %s."), name);
2239 error (
_(
"Attempt to extract a component of a value that is not a %s."),
2250 error (
_(
"No field with matching bitpos and type."));
2280 int offset,
struct type *type,
2281 struct fn_field **fn_list,
int *num_fns,
2283 struct type **basetype,
int *boffset)
2289 gdb_assert (fn_list != NULL && xm_worker_vec != NULL);
2296 if ((*fn_list) == NULL)
2303 if (fn_field_name && (
strcmp_iw (fn_field_name, method) == 0))
2333 *xm_worker_vec = new_vec;
2357 xm_worker_vec, basetype, boffset);
2380 int offset,
struct fn_field **fn_list,
2383 struct type **basetype,
int *boffset)
2401 error (
_(
"Attempt to extract a component of a "
2402 "value that is not a struct or union"));
2404 gdb_assert (fn_list != NULL && xm_worker_vec != NULL);
2409 *xm_worker_vec = NULL;
2466 int *staticp,
const int no_adl,
2469 struct value *obj = (objp ? *objp : NULL);
2470 struct type *obj_type = obj ?
value_type (obj) : NULL;
2472 int func_oload_champ = -1;
2473 int method_oload_champ = -1;
2474 int src_method_oload_champ = -1;
2475 int ext_method_oload_champ = -1;
2476 int src_and_ext_equal = 0;
2484 struct value *temp = obj;
2488 struct symbol **oload_syms = NULL;
2493 struct type *basetype = NULL;
2498 const char *obj_type_name = NULL;
2499 const char *func_name = NULL;
2515 obj_type_name =
TYPE_NAME (value_type (obj));
2533 &xm_worker_vec, &basetype, &boffset);
2536 if (method ==
METHOD && (!fns_ptr || !num_fns) && !xm_worker_vec)
2537 error (
_(
"Couldn't find method %s%s%s"),
2539 (obj_type_name && *obj_type_name) ?
"::" :
"",
2549 num_fns, fns_ptr, NULL,
2550 NULL, &src_method_badness);
2553 (src_method_badness, nargs,
2562 0, NULL, xm_worker_vec,
2563 NULL, &ext_method_badness);
2570 if (src_method_oload_champ >= 0 && ext_method_oload_champ >= 0)
2575 src_and_ext_equal = 1;
2585 if (ext_method_match_quality !=
STANDARD)
2587 method_oload_champ = src_method_oload_champ;
2588 method_badness = src_method_badness;
2589 ext_method_oload_champ = -1;
2590 method_match_quality = src_method_match_quality;
2595 method_oload_champ = ext_method_oload_champ;
2596 method_badness = ext_method_badness;
2597 src_method_oload_champ = -1;
2598 method_match_quality = ext_method_match_quality;
2601 method_oload_champ = src_method_oload_champ;
2602 method_badness = src_method_badness;
2603 ext_method_oload_champ = -1;
2604 method_match_quality = src_method_match_quality;
2612 else if (src_method_oload_champ >= 0)
2614 method_oload_champ = src_method_oload_champ;
2615 method_badness = src_method_badness;
2616 method_match_quality = src_method_match_quality;
2618 else if (ext_method_oload_champ >= 0)
2620 method_oload_champ = ext_method_oload_champ;
2621 method_badness = ext_method_badness;
2622 method_match_quality = ext_method_match_quality;
2628 const char *qualified_name = NULL;
2657 if (strcmp (temp, qualified_name) == 0)
2667 qualified_name =
name;
2673 if (func_name == NULL)
2687 if (func_oload_champ >= 0)
2695 if (method_oload_champ == -1 && func_oload_champ == -1)
2697 _(
"No symbol \"%s\" in current context."),
2703 if (method_oload_champ >= 0 && func_oload_champ >= 0)
2711 error (
_(
"Ambiguous overload resolution"));
2716 error (
_(
"Internal error: incompatible "
2717 "overload candidates proposed"));
2720 method_oload_champ = -1;
2721 match_quality = func_match_quality;
2724 func_oload_champ = -1;
2725 match_quality = method_match_quality;
2728 error (
_(
"Internal error: unexpected overload comparison result"));
2735 if (method_oload_champ >= 0)
2736 match_quality = method_match_quality;
2738 match_quality = func_match_quality;
2744 error (
_(
"Cannot resolve method %s%s%s to any overloaded instance"),
2746 (obj_type_name && *obj_type_name) ?
"::" :
"",
2749 error (
_(
"Cannot resolve function %s to any overloaded instance"),
2755 warning (
_(
"Using non-standard conversion to match "
2756 "method %s%s%s to supplied arguments"),
2758 (obj_type_name && *obj_type_name) ?
"::" :
"",
2761 warning (
_(
"Using non-standard conversion to match "
2762 "function %s to supplied arguments"),
2766 if (staticp != NULL)
2769 if (method_oload_champ >= 0)
2771 if (src_method_oload_champ >= 0)
2777 method_oload_champ, basetype,
2788 ext_method_oload_champ)));
2792 *symp = oload_syms[func_oload_champ];
2810 switch (match_quality)
2831 const char *func_name,
2832 const char *qualified_name,
2833 struct symbol ***oload_syms,
2842 oload_syms, oload_champ_bv,
2860 const char *func_name,
2861 const char *qualified_name,
2863 struct symbol ***oload_syms,
2868 int next_namespace_len = namespace_len;
2869 int searched_deeper = 0;
2872 int new_oload_champ;
2873 struct symbol **new_oload_syms;
2875 char *new_namespace;
2877 if (next_namespace_len != 0)
2879 gdb_assert (qualified_name[next_namespace_len] ==
':');
2880 next_namespace_len += 2;
2882 next_namespace_len +=
2887 *oload_champ_bv = NULL;
2892 if (qualified_name[next_namespace_len] ==
':')
2894 searched_deeper = 1;
2897 func_name, qualified_name,
2899 oload_syms, oload_champ_bv,
2900 oload_champ, no_adl))
2916 new_namespace = alloca (namespace_len + 1);
2917 strncpy (new_namespace, qualified_name, namespace_len);
2918 new_namespace[namespace_len] =
'\0';
2924 if (!searched_deeper && !no_adl)
2927 struct type **arg_types;
2930 arg_types = (
struct type **)
2931 alloca (nargs * (
sizeof (
struct type *)));
2932 for (ix = 0; ix < nargs; ix++)
2937 while (new_oload_syms[num_fns])
2941 NULL, NULL, new_oload_syms,
2942 &new_oload_champ_bv);
2951 if (new_oload_champ != -1
2954 *oload_syms = new_oload_syms;
2955 *oload_champ = new_oload_champ;
2956 *oload_champ_bv = new_oload_champ_bv;
2960 else if (searched_deeper)
2962 xfree (new_oload_syms);
2963 xfree (new_oload_champ_bv);
2969 *oload_syms = new_oload_syms;
2970 *oload_champ = new_oload_champ;
2971 *oload_champ_bv = new_oload_champ_bv;
2993 int num_fns,
struct fn_field *fns_ptr,
2995 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)
3044 parm_types = (
struct type **)
3045 xmalloc (nparms * (
sizeof (
struct type *)));
3046 for (jj = 0; jj < nparms; jj++)
3047 parm_types[jj] = (fns_ptr != NULL
3056 args + static_offset,
3057 nargs - static_offset);
3059 if (!*oload_champ_bv)
3061 *oload_champ_bv = bv;
3069 oload_ambiguous = 1;
3072 oload_ambiguous = 2;
3075 *oload_champ_bv = bv;
3076 oload_ambiguous = 0;
3086 if (fns_ptr != NULL)
3088 "Overloaded method instance %s, # of parms %d\n",
3089 fns_ptr[ix].physname, nparms);
3090 else if (xm_worker_vec != NULL)
3092 "Xmethod worker, # of parms %d\n",
3096 "Overloaded function instance "
3097 "%s # of parms %d\n",
3100 for (jj = 0; jj < nargs - static_offset; jj++)
3102 "...Badness @ %d : %d\n",
3105 "champion is %d, ambiguous? %d\n",
3106 oload_champ, oload_ambiguous);
3135 for (ix = 1; ix <= nargs - static_offset; ix++)
3166 const char *cp = strchr (dname,
'<');
3171 len = strlen (dname);
3174 if (strlen (name + 1) != len || strncmp (dname, name + 1, len) != 0)
3175 error (
_(
"name of destructor must equal name of class"));
3186 static struct value *
3190 int name_len = strlen (name);
3206 len = strlen (fname);
3207 if (len + 2 >= name_len
3208 && fname[len - name_len - 2] ==
':'
3209 && fname[len - name_len - 1] ==
':'
3210 && strcmp (&fname[len - name_len], name) == 0)
3214 error (
_(
"no constant named \"%s\" in enum \"%s\""),
3226 struct type *expect_type,
int want_address,
3235 want_address, noside);
3238 want_address, noside);
3245 _(
"non-aggregate type in value_aggregate_elt"));
3268 if (skip_artificial)
3308 static struct value *
3310 struct type *curtype,
const char *
name,
3311 struct type *intype,
3315 struct type *t = curtype;
3317 struct value *v, *result;
3321 error (
_(
"Internal error: non-aggregate type "
3322 "to value_struct_elt_for_reference"));
3328 if (t_field_name && strcmp (t_field_name, name) == 0)
3338 error (
_(
"pointers to bitfield members not allowed"));
3356 struct type *
type, *tmp;
3371 error (
_(
"Cannot reference non-static field \"%s\""), name);
3386 char dem_opname[64];
3392 if (cplus_demangle_opname (t_field_name,
3393 dem_opname, DMGL_ANSI))
3394 t_field_name = dem_opname;
3395 else if (cplus_demangle_opname (t_field_name,
3397 t_field_name = dem_opname;
3399 if (t_field_name && strcmp (t_field_name, name) == 0)
3409 for (j = 0; j <
len; ++j)
3418 error (
_(
"no member function matches "
3419 "that type instantiation"));
3426 for (ii = 0; ii <
len; ++ii)
3444 error (
_(
"non-unique member `%s' requires "
3445 "type instantiation"), name);
3451 error (
_(
"no matching member function"));
3482 error (
_(
"Cannot reference virtual member function \"%s\""),
3518 offset + base_offset,
3521 want_address, noside);
3531 want_address, noside);
3537 static struct value *
3539 const char *
name,
int want_address,
3547 error (
_(
"No symbol \"%s\" in namespace \"%s\"."),
3559 static struct value *
3561 const char *
name,
int want_address,
3566 struct value *result;
3592 int *top,
int *using_enc)
3594 struct value *target = NULL;
3595 struct type *
type, *real_type, *target_type;
3660 int xfull,
int xtop,
3663 struct type *real_type;
3667 struct value *new_val;
3674 using_enc = xusing_enc;
3703 warning (
_(
"Couldn't retrieve complete object of RTTI "
3704 "type %s; object may be in register(s)."),
3731 const struct block *b;
3735 error (
_(
"no `this' in current language"));
3743 error (
_(
"current stack frame does not contain a variable named `%s'"),
3755 struct value *ret = NULL;
3776 struct type *slice_range_type, *slice_type, *range_type;
3777 LONGEST lowerbound, upperbound;
3778 struct value *slice;
3779 struct type *array_type;
3784 error (
_(
"cannot take slice of non-array"));
3788 error (
_(
"slice from bad array or bitstring"));
3790 if (lowbound < lowerbound || length < 0
3791 || lowbound + length - 1 > upperbound)
3792 error (
_(
"slice out of range"));
3799 lowbound + length - 1);
3855 static struct value *
3880 error (
_(
"cannot cast non-number to complex"));
3887 &overload_resolution,
_(
"\
3888 Set overload resolution in evaluating C++ functions."),
_(
"\
3889 Show overload resolution in evaluating C++ functions."),
3893 overload_resolution = 1;
const struct rank INCOMPATIBLE_TYPE_BADNESS
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)
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
#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)
struct value * call_function_by_hand(struct value *function, int nargs, struct value **args)
int decimal_from_string(gdb_byte *decbytes, int len, enum bfd_endian byte_order, const char *string)
static struct value * cast_into_complex(struct type *, struct value *)
struct value * value_addr(struct value *arg1)
struct value * value_primitive_field(struct value *arg1, int offset, int fieldno, struct type *arg_type)
struct frame_info * get_selected_frame(const char *message)
#define VALUE_FRAME_ID(val)
void(* deprecated_register_changed_hook)(int regno)
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)
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
void value_contents_copy(struct value *dst, int dst_offset, struct value *src, int src_offset, int length)
struct value * value_struct_elt_bitpos(struct value **argp, int bitpos, struct type *ftype, const char *err)
struct symbol * cp_lookup_symbol_namespace(const char *scope, const char *name, const struct block *block, const domain_enum domain)
int value_offset(const struct value *value)
struct value * value_ref(struct value *arg1)
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,...)
void observer_notify_register_changed(struct frame_info *frame, int regnum)
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)
void decimal_convert(const gdb_byte *from, int len_from, enum bfd_endian byte_order_from, gdb_byte *to, int len_to, enum bfd_endian byte_order_to)
int value_bitpos(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 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)
struct value * value_coerce_function(struct value *arg1)
struct value * coerce_ref(struct value *arg)
#define TYPE_FN_FIELD_STATIC_P(thisfn, n)
struct value * read_var_value(struct symbol *var, struct frame_info *frame)
void set_value_lazy(struct value *value, int val)
struct value * value_ind(struct value *arg1)
struct value * value_copy(struct value *arg)
void mark_value_bytes_unavailable(struct value *value, int offset, int length)
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)
int is_public_ancestor(struct type *base, struct type *dclass)
const gdb_byte * value_contents_for_printing(struct value *value)
struct value * value_string(char *ptr, ssize_t len, struct type *char_type)
#define TYPE_FIELD(thistype, n)
struct value * value_parent(struct value *value)
#define TYPE_FN_FIELD_ARGS(thisfn, n)
#define TYPE_FIELD_ENUMVAL(thistype, n)
#define TYPE_FIELD_TYPE(thistype, n)
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 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 int oload_method_static_p(struct fn_field *, int)
int gdbarch_convert_register_p(struct gdbarch *gdbarch, int regnum, struct type *type)
static struct value * search_struct_field(const char *, struct value *, struct type *, int)
void decimal_from_floating(struct value *from, gdb_byte *to, int len, enum bfd_endian byte_order)
static int compare_parameters(struct type *t1, struct type *t2, int skip_artificial)
#define BLOCK_FUNCTION(bl)
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)
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)
struct frame_info * block_innermost_frame(const struct block *block)
const gdb_byte * value_contents(struct value *value)
#define CATCH(EXCEPTION, MASK)
struct type * lookup_memberptr_type(struct type *type, struct type *domain)
struct value * value_from_decfloat(struct type *type, const gdb_byte *dec)
struct target_ops current_target
#define TYPE_FN_FIELD_ARTIFICIAL(thisfn, n)
int value_lazy(struct value *value)
int field_is_static(struct field *f)
struct symbol * lookup_language_this(const struct language_defn *lang, const struct block *block)
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)
int value_bitsize(const struct value *value)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t err
struct value * find_function_in_inferior(const char *name, struct objfile **objf_p)
unsigned int cp_find_first_component(const char *name)
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)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int status
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)
struct type * value_enclosing_type(struct value *value)
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)
static struct value * search_struct_method(const char *, struct value **, struct value **, int, int *, struct type *)
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)
static int startswith(const char *string, const char *pattern)
void set_value_offset(struct value *value, int offset)
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)
struct type * value_rtti_indirect_type(struct value *v, int *full, int *top, int *using_enc)
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)
#define TYPE_BASECLASS(thistype, index)
#define TYPE_FIELD_PACKED(thistype, n)
int deprecated_value_modifiable(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)
struct value * value_from_double(struct type *type, DOUBLEST num)
static struct value * value_struct_elt_for_reference(struct type *, int, struct type *, const char *, struct type *, int, enum noside)
int baseclass_offset(struct type *type, int index, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, const struct value *val)
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 * value_fn_field(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
struct value *(* indirect)(struct value *value)
static int find_oload_champ(struct value **, int, int, struct fn_field *, VEC(xmethod_worker_ptr)*, struct symbol **, struct badness_vector **)
#define TYPE_FN_FIELD_VOFFSET(thisfn, n)
void throw_exception(struct gdb_exception exception)
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)
const char const char int
int block_inlined_p(const struct block *bl)
int types_equal(struct type *a, struct type *b)
#define TYPE_FN_FIELD_TYPE(thisfn, n)
void set_internalvar_component(struct internalvar *var, int offset, int bitpos, int bitsize, struct value *newval)
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)
static void update_search_result(struct value **result_ptr, struct value *v, int *last_boffset, int boffset, const char *name, struct type *type)
void observer_notify_target_changed(struct target_ops *target)
void set_value_embedded_offset(struct value *value, int val)
const struct language_defn * current_language
#define TYPE_TARGET_TYPE(thistype)
void value_fetch_lazy(struct value *val)
void set_value_pointed_to_offset(struct value *value, int 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)
void modify_field(struct type *type, gdb_byte *addr, LONGEST fieldval, int bitpos, int bitsize)
void read_value_memory(struct value *val, int embedded_offset, int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length)
#define TYPE_BASECLASS_NAME(thistype, index)
int value_pointed_to_offset(struct value *value)
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)
struct ui_file * gdb_stderr
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type)
struct minimal_symbol * minsym
void decimal_from_integral(struct value *from, gdb_byte *to, int len, enum bfd_endian byte_order)
struct value * value_repeat(struct value *arg1, int count)
static CORE_ADDR allocate_space_in_inferior(int)
struct symbol * lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
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)
struct value * value_cstring(char *ptr, ssize_t len, struct type *char_type)
struct value * value_one(struct type *type)
struct type * value_rtti_type(struct value *v, int *full, int *top, int *using_enc)
#define CHECK_TYPEDEF(TYPE)
int value_logical_not(struct value *arg1)
void check_stub_method_group(struct type *type, int method_id)
#define TYPE_TAG_NAME(type)
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)
int get_frame_register_bytes(struct frame_info *frame, int regnum, CORE_ADDR offset, int len, gdb_byte *myaddr, int *optimizedp, int *unavailablep)
void _initialize_valops(void)
#define SYMBOL_NATURAL_NAME(symbol)
unsigned long long ULONGEST
#define BASETYPE_VIA_PUBLIC(thistype, index)
target_xfer_partial_ftype target_xfer_partial
int value_embedded_offset(struct value *value)
struct value * value_allocate_space_in_inferior(int len)
struct value * value_slice(struct value *array, int lowbound, int length)
struct type * value_type(const struct value *value)
#define SYMBOL_TYPE(symbol)
struct type * lookup_reference_type(struct type *type)
struct type ** get_xmethod_arg_types(struct xmethod_worker *worker, int *nargs)
CORE_ADDR value_as_address(struct value *val)
static void value_find_oload_method_list(struct value **argp, const char *method, int offset, struct fn_field **fn_list, int *num_fns, VEC(xmethod_worker_ptr)**xm_worker_vec, struct type **basetype, int *boffset)
int is_unique_ancestor(struct type *base, struct value *val)
struct value * readjust_indirect_value_type(struct value *value, struct type *enc_type, struct type *original_type, struct value *original_value)
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)
#define TYPE_FN_FIELDLIST_LENGTH(thistype, n)
int value_stack(struct value *value)
int compare_ranks(struct rank a, struct rank b)
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)
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)
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)
#define TYPE_SELF_TYPE(thistype)
void error(const char *fmt,...)
DOUBLEST value_as_double(struct value *val)
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
void do_cleanups(struct cleanup *old_chain)
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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
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)
static void find_method_list(struct value **, const char *, int, struct type *, struct fn_field **, int *, VEC(xmethod_worker_ptr)**, struct type **, int *)
const ULONGEST const LONGEST len
const struct lval_funcs * value_computed_funcs(const struct value *v)