43#include "gdbsupport/byte-vector.h"
48static int typecmp (
bool staticp,
bool varargs,
int nargs,
49 struct field t1[],
const gdb::array_view<value *> t2);
55 gdb::optional<gdb::array_view<value *>>,
56 LONGEST,
int *,
struct type *);
59 const char *,
const char *,
60 std::vector<symbol *> *oload_syms,
65 const char *,
const char *,
66 int, std::vector<symbol *> *oload_syms,
91 const char *,
int ,
enum noside);
107 gdb_printf (file, _(
"Overload resolution in evaluating "
108 "C++ functions is %s.\n"),
126 error (_(
"\"%s\" exists in this program but is not a function."),
140 if (msymbol.
minsym != NULL)
160 error (_(
"evaluation of this expression "
161 "requires the target program to be active"));
163 error (_(
"evaluation of this expression requires the "
164 "program to have a function \"%s\"."),
180 struct value *blocklen;
187 error (_(
"No memory available to program now: "
188 "you need to start the target first"));
190 error (_(
"No memory available to program: call to malloc failed"));
213 gdb_assert (
type != NULL && v2 != NULL);
219 gdb_assert ((t1->
code () == TYPE_CODE_STRUCT
220 || t1->
code () == TYPE_CODE_UNION)
221 && !!
"Precondition is that type is of STRUCT or UNION kind.");
222 gdb_assert ((t2->
code () == TYPE_CODE_STRUCT
223 || t2->
code () == TYPE_CODE_UNION)
224 && !!
"Precondition is that value is of STRUCT or UNION kind");
226 if (t1->
name () != NULL
227 && t2->
name () != NULL
228 && !strcmp (t1->
name (), t2->
name ()))
234 if (t1->
name () != NULL)
245 if (t2->
name () != NULL)
250 struct type *real_type;
257 real_type = v->
type ();
261 if (real_type->
name () != NULL
262 && !strcmp (real_type->
name (), t1->
name ()))
304 if (t1->
code () == TYPE_CODE_STRUCT
305 && t2->
code () == TYPE_CODE_STRUCT
315 == TYPE_CODE_STRUCT && !!
"Why did coercion fail?");
328 arg2 = arg2->
copy ();
368 struct type *from_type = from_val->
type ();
370 if (from_type == to_type)
376 error (_(
"Invalid conversion from type %s to fixed point type %s"),
377 from_type->
name (), to_type->
name ());
410 int convert_to_boolean = 0;
426 arg2 = arg2->
copy ();
469 if (code1 == TYPE_CODE_ARRAY)
477 int val_length = type2->
length ();
478 LONGEST low_bound, high_bound, new_length;
481 low_bound = 0, high_bound = 0;
482 new_length = val_length / element_length;
483 if (val_length % element_length != 0)
484 warning (_(
"array element type size does not "
485 "divide object size in cast"));
492 new_length + low_bound - 1);
501 && type2->
code () == TYPE_CODE_ARRAY
505 if (type2->
code () == TYPE_CODE_FUNC)
509 code2 = type2->
code ();
511 if (code1 == TYPE_CODE_COMPLEX)
513 if (code1 == TYPE_CODE_BOOL)
515 code1 = TYPE_CODE_INT;
516 convert_to_boolean = 1;
518 if (code1 == TYPE_CODE_CHAR)
519 code1 = TYPE_CODE_INT;
520 if (code2 == TYPE_CODE_BOOL || code2 == TYPE_CODE_CHAR)
521 code2 = TYPE_CODE_INT;
523 scalar = (code2 == TYPE_CODE_INT || code2 == TYPE_CODE_FLT
524 || code2 == TYPE_CODE_DECFLOAT || code2 == TYPE_CODE_ENUM
525 || code2 == TYPE_CODE_RANGE
528 if ((code1 == TYPE_CODE_STRUCT || code1 == TYPE_CODE_UNION)
529 && (code2 == TYPE_CODE_STRUCT || code2 == TYPE_CODE_UNION)
568 else if ((code1 == TYPE_CODE_INT || code1 == TYPE_CODE_ENUM
569 || code1 == TYPE_CODE_RANGE)
570 && (scalar || code2 == TYPE_CODE_PTR
571 || code2 == TYPE_CODE_MEMBERPTR))
581 if (code2 == TYPE_CODE_PTR)
586 if (convert_to_boolean)
587 longest = bool (longest);
591 else if (code1 == TYPE_CODE_PTR && (code2 == TYPE_CODE_INT
592 || code2 == TYPE_CODE_ENUM
593 || code2 == TYPE_CODE_RANGE))
608 if (addr_bit <
sizeof (LONGEST) * HOST_CHAR_BIT)
610 if (longest >= ((LONGEST) 1 << addr_bit)
611 || longest <= -((LONGEST) 1 << addr_bit))
612 warning (_(
"value truncated"));
616 else if (code1 == TYPE_CODE_METHODPTR && code2 == TYPE_CODE_INT
625 else if (code1 == TYPE_CODE_MEMBERPTR && code2 == TYPE_CODE_INT
633 && code2 == TYPE_CODE_ARRAY && type2->
is_vector ()
635 error (_(
"Cannot convert between vector values of different sizes"));
636 else if (code1 == TYPE_CODE_ARRAY &&
type->
is_vector () && scalar
638 error (_(
"can only cast scalar to vector of same size"));
639 else if (code1 == TYPE_CODE_VOID)
645 if (code1 == TYPE_CODE_PTR && code2 == TYPE_CODE_PTR)
648 arg2 = arg2->
copy ();
659 error (_(
"Invalid type conversion."));
660 error (_(
"Invalid cast."));
669 struct value *result;
671 struct type *arg_type, *dest_type;
691 arg_type = arg->
type ();
693 dest_code = real_type->
code ();
694 arg_code = arg_type->
code ();
698 if ((dest_code == TYPE_CODE_PTR && arg_code == TYPE_CODE_INT)
699 || (dest_code == TYPE_CODE_INT && arg_code == TYPE_CODE_PTR)
700 || (dest_code == TYPE_CODE_METHODPTR && arg_code == TYPE_CODE_INT)
701 || (dest_code == TYPE_CODE_INT && arg_code == TYPE_CODE_METHODPTR)
702 || (dest_code == TYPE_CODE_MEMBERPTR && arg_code == TYPE_CODE_INT)
703 || (dest_code == TYPE_CODE_INT && arg_code == TYPE_CODE_MEMBERPTR)
704 || (dest_code == arg_code
705 && (dest_code == TYPE_CODE_PTR
706 || dest_code == TYPE_CODE_METHODPTR
707 || dest_code == TYPE_CODE_MEMBERPTR)))
710 error (_(
"Invalid reinterpret_cast"));
726 const gdb_byte *valaddr,
727 LONGEST embedded_offset,
730 struct type *search_type,
732 struct type *arg_type,
733 struct value **result)
735 int i, result_count = 0;
745 if (address + embedded_offset + offset >= arg_addr
746 && address + embedded_offset + offset < arg_addr + arg_type->
length ())
751 address + embedded_offset + offset);
757 embedded_offset + offset,
774 const gdb_byte *valaddr,
775 LONGEST embedded_offset,
778 struct type *search_type,
779 struct value **result)
781 int i, result_count = 0;
797 address + embedded_offset + offset);
802 embedded_offset + offset,
820 struct type *class_type, *rtti_type;
821 struct value *result, *tem, *original_arg = arg;
825 if (resolved_type->
code () != TYPE_CODE_PTR
827 error (_(
"Argument to dynamic_cast must be a pointer or reference type"));
830 error (_(
"Argument to dynamic_cast must be pointer to class or `void *'"));
833 if (resolved_type->
code () == TYPE_CODE_PTR)
835 if (arg_type->
code () != TYPE_CODE_PTR
836 && ! (arg_type->
code () == TYPE_CODE_INT
838 error (_(
"Argument to dynamic_cast does not have pointer type"));
839 if (arg_type->
code () == TYPE_CODE_PTR)
842 if (arg_type->
code () != TYPE_CODE_STRUCT)
843 error (_(
"Argument to dynamic_cast does "
844 "not have pointer to class type"));
855 if (arg_type->
code () != TYPE_CODE_STRUCT)
856 error (_(
"Argument to dynamic_cast does not have class type"));
869 error (_(
"Ambiguous dynamic_cast"));
874 error (_(
"Couldn't determine value's most derived type for dynamic_cast"));
889 if (resolved_type->
code () == TYPE_CODE_PTR
922 rtti_type, &result) == 1)
928 if (resolved_type->
code () == TYPE_CODE_PTR)
931 error (_(
"dynamic_cast failed"));
946 else if (type1->
code () == TYPE_CODE_ARRAY && type1->
is_vector ())
950 LONGEST low_bound, high_bound;
953 error (_(
"Could not determine the vector bounds"));
957 int elt_len = eltype->
length ();
959 for (i = 0; i < high_bound - low_bound + 1; i++)
963 val_contents.slice (i * elt_len, elt_len));
968 error (_(
"Not a numeric type."));
989 error (_(
"Attempt to dereference a generic pointer."));
1043 bool stack, CORE_ADDR memaddr,
1044 gdb_byte *buffer,
size_t length)
1046 ULONGEST xfered_total = 0;
1053 while (xfered_total < length)
1056 ULONGEST xfered_partial;
1060 buffer + xfered_total * unit_size, NULL,
1061 memaddr + xfered_total,
1062 length - xfered_total,
1070 xfered_partial * HOST_CHAR_BIT);
1076 xfered_total += xfered_partial;
1092 error (_(
"Left operand of assignment is not a modifiable lvalue."));
1114 switch (toval->
lval ())
1123 LONGEST offset = toval->
offset ();
1147 const gdb_byte *dest_buffer;
1148 CORE_ADDR changed_addr;
1150 gdb_byte buffer[
sizeof (LONGEST)];
1157 changed_len = (toval->
bitpos ()
1159 + HOST_CHAR_BIT - 1)
1166 if (changed_len < type->length ()
1168 && ((LONGEST) changed_addr %
type->
length ()) == 0)
1171 if (changed_len > (
int)
sizeof (LONGEST))
1172 error (_(
"Can't handle bitfields which "
1173 "don't fit in a %d bit word."),
1174 (
int)
sizeof (LONGEST) * HOST_CHAR_BIT);
1179 dest_buffer = buffer;
1183 changed_addr = toval->
address ();
1185 dest_buffer = fromval->
contents ().data ();
1211 error (_(
"Value being assigned to is no longer active."));
1220 gdb_byte buffer[
sizeof (LONGEST)];
1223 changed_len = (toval->
bitpos ()
1225 + HOST_CHAR_BIT - 1)
1228 if (changed_len >
sizeof (LONGEST))
1229 error (_(
"Can't handle bitfields which "
1230 "don't fit in a %d bit word."),
1231 (int)
sizeof (LONGEST) * HOST_CHAR_BIT);
1234 {buffer, changed_len},
1238 throw_error (OPTIMIZED_OUT_ERROR,
1239 _(
"value has been optimized out"));
1241 throw_error (NOT_AVAILABLE_ERROR,
1242 _(
"value is not available"));
1249 {buffer, changed_len});
1277 if (funcs->
write != NULL)
1279 funcs->
write (toval, fromval);
1286 error (_(
"Left operand of assignment is not an lvalue."));
1294 switch (toval->
lval ())
1328 && (toval->
bitsize () < 8 * (
int) sizeof (LONGEST)))
1331 LONGEST valmask = (((ULONGEST) 1) << toval->
bitsize ()) - 1;
1333 fieldval &= valmask;
1335 && (fieldval & (valmask ^ (valmask >> 1))))
1336 fieldval |= ~valmask;
1344 val = toval->
copy ();
1352 if (
type->
code () == TYPE_CODE_PTR)
1369 error (_(
"Only values in memory can be extended with '@'."));
1371 error (_(
"Invalid number %d of repetitions."), count);
1409 ||
type->
code () == TYPE_CODE_FUNC)
1411 CORE_ADDR addr = val->
address ();
1417 switch (val->
lval ())
1422 const char *regname;
1429 gdb_assert (regname !=
nullptr && *regname !=
'\0');
1431 error (_(
"Address requested for identifier "
1432 "\"%s\" which is in register $%s"),
1438 error (_(
"Can't take address of \"%s\" which isn't an lvalue."),
1451 struct type *valtype;
1461 switch (valtype->
code ())
1463 case TYPE_CODE_ARRAY:
1465 case TYPE_CODE_STRING:
1525 error (_(
"Attempt to take address of value not located in memory."));
1537 struct value *retval;
1540 error (_(
"Attempt to take address of value not located in memory."));
1567 struct type *type_ptr
1569 struct type *enclosing_type
1571 struct type *enclosing_type_ptr
1574 arg2 = arg1->
copy ();
1581 if (
type->
code () == TYPE_CODE_FUNC)
1589 error (_(
"Attempt to take address of value not located in memory."));
1614 gdb_assert (refcode == TYPE_CODE_REF || refcode == TYPE_CODE_RVALUE_REF);
1616 if ((
type->
code () == TYPE_CODE_REF
1617 ||
type->
code () == TYPE_CODE_RVALUE_REF)
1632 struct type *base_type;
1652 if (base_type->
code () == TYPE_CODE_PTR)
1654 struct type *enc_type;
1661 CORE_ADDR base_addr;
1676 enc_type = arg2->
type ();
1681 error (_(
"Attempt to take contents of a non-pointer value."));
1698 ULONGEST typelength;
1700 struct type *arraytype;
1706 for (
struct value *other : elemvec.slice (1))
1710 error (_(
"array elements must all be the same size"));
1716 lowbound + elemvec.size () - 1);
1721 for (idx = 0; idx < elemvec.size (); idx++)
1722 elemvec[idx]->contents_copy (val, idx * typelength, 0, typelength);
1730 for (idx = 0; idx < elemvec.size (); idx++)
1731 elemvec[idx]->contents_copy (val, idx * typelength, 0, typelength);
1742 ssize_t highbound = count + 1;
1743 struct type *stringtype
1747 ssize_t len = count * char_type->
length ();
1761 ssize_t highbound = count;
1762 struct type *stringtype
1766 ssize_t len = count * char_type->
length ();
1791 struct field t1[], gdb::array_view<value *> t2)
1801 (i < nargs) && t1[i].
type ()->
code () != TYPE_CODE_VOID;
1804 struct type *tt1, *tt2;
1806 if (i == t2.size ())
1817 if (tt2->
code () == TYPE_CODE_ARRAY)
1834 while (tt2->
code () == TYPE_CODE_ARRAY
1835 || tt2->
code () == TYPE_CODE_PTR
1851 if (varargs || i == t2.size ())
1875 struct type *outermost_type,
1876 bool looking_for_baseclass)
1944 error (_(
"base class '%s' is ambiguous in type '%s'"),
1964 bool ambiguous =
false, insert =
true;
1981 if (ambiguous && insert)
2023 && t_field_name[0] ==
'\0')
2027 if (field_type->
code () == TYPE_CODE_UNION
2028 || field_type->
code () == TYPE_CODE_STRUCT)
2042 LONGEST new_offset = offset;
2050 if (field_type->
code () == TYPE_CODE_STRUCT
2055 search (arg1, new_offset, field_type);
2060 for (i = 0; i < nbases; i++)
2062 struct value *v = NULL;
2090 CORE_ADDR base_addr;
2092 base_addr = arg1->
address () + boffset;
2097 error (_(
"virtual baseclass botch"));
2106 if (found_baseclass)
2111 else if (found_baseclass)
2130static struct value *
2132 struct type *
type,
int looking_for_baseclass)
2138 if (!looking_for_baseclass)
2140 const auto &fields = searcher.
fields ();
2142 if (fields.empty ())
2144 else if (fields.size () == 1)
2145 return fields[0].field_value;
2148 std::string candidates;
2150 for (
auto &&candidate : fields)
2152 gdb_assert (!candidate.path.empty ());
2154 struct type *field_type = candidate.field_value->type ();
2155 struct type *struct_type = candidate.path.back ();
2159 for (
struct type *t : candidate.path)
2168 candidates += string_printf (
"\n '%s %s::%s' (%s)",
2175 error (_(
"Request for member '%s' is ambiguous in type '%s'."
2176 " Candidates are:%s"),
2178 candidates.c_str ());
2197static struct value *
2199 gdb::optional<gdb::array_view<value *>> args,
2200 LONGEST
offset,
int *static_memfuncp,
2205 int name_matched = 0;
2219 if (j > 0 && !args.has_value ())
2220 error (_(
"cannot resolve overloaded method "
2221 "`%s': no arguments supplied"),
name);
2222 else if (j == 0 && !args.has_value ())
2231 gdb_assert (args.has_value ());
2242 *static_memfuncp = 1;
2254 LONGEST base_offset;
2255 LONGEST this_offset;
2260 struct value *base_val;
2261 const gdb_byte *base_valaddr;
2271 gdb::byte_vector tmp (baseclass->
length ());
2272 address = (*arg1p)->address ();
2275 tmp.data (), baseclass->
length ()) != 0)
2276 error (_(
"virtual baseclass botch"));
2292 this_offset, base_val->
address (),
2301 if (v == (
struct value *) - 1)
2313 return (
struct value *) - 1;
2335 gdb::optional<gdb::array_view<value *>> args,
2336 const char *
name,
int *static_memfuncp,
const char *
err)
2356 if (t->
code () != TYPE_CODE_STRUCT
2357 && t->
code () != TYPE_CODE_UNION)
2358 error (_(
"Attempt to extract a component of a value that is not a %s."),
2362 if (static_memfuncp)
2363 *static_memfuncp = 0;
2365 if (!args.has_value ())
2387 static_memfuncp, t);
2389 if (v == (
struct value *) - 1)
2390 error (_(
"Cannot take address of method %s."),
name);
2394 error (_(
"There is no member or method named %s."),
name);
2396 error (_(
"There is no member named %s."),
name);
2402 static_memfuncp, t);
2404 if (v == (
struct value *) - 1)
2406 error (_(
"One of the arguments you tried to pass to %s could not "
2407 "be converted to what the function wants."),
name);
2417 if (v && static_memfuncp)
2418 *static_memfuncp = 1;
2422 throw_error (NOT_FOUND_ERROR,
2423 _(
"Structure has no component named %s."),
name);
2451 if (t->
code () != TYPE_CODE_STRUCT
2452 && t->
code () != TYPE_CODE_UNION)
2453 error (_(
"Attempt to extract a component of a value that is not a %s."),
2461 return (*argp)->primitive_field (0, i, t);
2464 error (_(
"No field with matching bitpos and type."));
2495 gdb::array_view<fn_field> *methods,
2496 std::vector<xmethod_worker_up> *xmethods,
2497 struct type **basetype, LONGEST *boffset)
2502 gdb_assert (methods != NULL && xmethods != NULL);
2509 if (methods->empty ())
2516 if (fn_field_name && (
strcmp_iw (fn_field_name, method) == 0))
2520 *methods = gdb::make_array_view (
f, len);
2547 LONGEST base_offset;
2552 (*argp)->contents_for_printing ().data (),
2553 (*argp)->offset () + offset,
2554 (*argp)->address (), *argp);
2564 xmethods, basetype, boffset);
2587 gdb::array_view<fn_field> *methods,
2588 std::vector<xmethod_worker_up> *xmethods,
2589 struct type **basetype, LONGEST *boffset)
2605 if (t->
code () != TYPE_CODE_STRUCT
2606 && t->
code () != TYPE_CODE_UNION)
2607 error (_(
"Attempt to extract a component of a "
2608 "value that is not a struct or union"));
2610 gdb_assert (methods != NULL && xmethods != NULL);
2629 int incomplete_types = 0;
2630 std::string incomplete_arg_names;
2631 for (
const struct value *arg : args)
2633 struct type *t = arg->type ();
2634 while (t->
code () == TYPE_CODE_PTR)
2639 if (incomplete_types > 0)
2640 incomplete_arg_names +=
", ";
2646 incomplete_arg_names += buffer.
string ();
2650 if (incomplete_types > 1)
2651 hint = string_printf (_(
"\nThe types: '%s' aren't fully known to GDB."
2652 " Please cast them directly to the desired"
2653 " typed in the function call."),
2654 incomplete_arg_names.c_str ());
2655 else if (incomplete_types == 1)
2656 hint = string_printf (_(
"\nThe type: '%s' isn't fully known to GDB."
2657 " Please cast it directly to the desired"
2658 " typed in the function call."),
2659 incomplete_arg_names.c_str ());
2714 int *staticp,
const int no_adl,
2717 struct value *obj = (objp ? *objp : NULL);
2718 struct type *obj_type = obj ? obj->
type () : NULL;
2720 int func_oload_champ = -1;
2721 int method_oload_champ = -1;
2722 int src_method_oload_champ = -1;
2723 int ext_method_oload_champ = -1;
2731 struct value *temp = obj;
2733 gdb::array_view<fn_field> methods;
2735 std::vector<symbol *> functions;
2737 std::vector<xmethod_worker_up> xmethods;
2738 struct type *basetype = NULL;
2741 const char *obj_type_name = NULL;
2742 const char *func_name = NULL;
2743 gdb::unique_xmalloc_ptr<char> temp_func;
2759 obj_type_name = obj->
type ()->
name ();
2776 &xmethods, &basetype, &boffset);
2779 if (method ==
METHOD && methods.empty () && xmethods.empty ())
2780 error (_(
"Couldn't find method %s%s%s"),
2782 (obj_type_name && *obj_type_name) ?
"::" :
"",
2787 if (!methods.empty ())
2791 src_method_oload_champ
2794 methods.data (), NULL, NULL,
2795 &src_method_badness);
2798 (src_method_badness, args.size (),
2802 if (!xmethods.empty ())
2804 ext_method_oload_champ
2807 NULL, xmethods.data (), NULL,
2808 &ext_method_badness);
2813 if (src_method_oload_champ >= 0 && ext_method_oload_champ >= 0)
2827 if (ext_method_match_quality !=
STANDARD)
2829 method_oload_champ = src_method_oload_champ;
2830 method_badness = src_method_badness;
2831 ext_method_oload_champ = -1;
2832 method_match_quality = src_method_match_quality;
2837 method_oload_champ = ext_method_oload_champ;
2838 method_badness = ext_method_badness;
2839 src_method_oload_champ = -1;
2840 method_match_quality = ext_method_match_quality;
2843 method_oload_champ = src_method_oload_champ;
2844 method_badness = src_method_badness;
2845 ext_method_oload_champ = -1;
2846 method_match_quality = src_method_match_quality;
2849 gdb_assert_not_reached (
"Unexpected overload comparison "
2854 else if (src_method_oload_champ >= 0)
2856 method_oload_champ = src_method_oload_champ;
2857 method_badness = src_method_badness;
2858 method_match_quality = src_method_match_quality;
2860 else if (ext_method_oload_champ >= 0)
2862 method_oload_champ = ext_method_oload_champ;
2863 method_badness = ext_method_badness;
2864 method_match_quality = ext_method_match_quality;
2870 const char *qualified_name = NULL;
2894 if (temp_func !=
nullptr)
2896 if (strcmp (temp_func.get (), qualified_name) == 0)
2899 func_name = temp_func.get ();
2906 qualified_name =
name;
2912 if (func_name == NULL)
2925 if (func_oload_champ >= 0)
2931 if (method_oload_champ == -1 && func_oload_champ == -1)
2932 throw_error (NOT_FOUND_ERROR,
2933 _(
"No symbol \"%s\" in current context."),
2939 if (method_oload_champ >= 0 && func_oload_champ >= 0)
2947 error (_(
"Ambiguous overload resolution"));
2952 error (_(
"Internal error: incompatible "
2953 "overload candidates proposed"));
2956 method_oload_champ = -1;
2957 match_quality = func_match_quality;
2960 func_oload_champ = -1;
2961 match_quality = method_match_quality;
2964 error (_(
"Internal error: unexpected overload comparison result"));
2971 if (method_oload_champ >= 0)
2972 match_quality = method_match_quality;
2974 match_quality = func_match_quality;
2981 error (_(
"Cannot resolve method %s%s%s to any overloaded instance%s"),
2983 (obj_type_name && *obj_type_name) ?
"::" :
"",
2984 name, hint.c_str ());
2986 error (_(
"Cannot resolve function %s to any overloaded instance%s"),
2987 func_name, hint.c_str ());
2992 warning (_(
"Using non-standard conversion to match "
2993 "method %s%s%s to supplied arguments"),
2995 (obj_type_name && *obj_type_name) ?
"::" :
"",
2998 warning (_(
"Using non-standard conversion to match "
2999 "function %s to supplied arguments"),
3003 if (staticp != NULL)
3006 if (method_oload_champ >= 0)
3008 if (src_method_oload_champ >= 0)
3014 method_oload_champ, basetype,
3019 method_oload_champ, basetype, boffset);
3023 (std::move (xmethods[ext_method_oload_champ]));
3026 *symp = functions[func_oload_champ];
3033 if (temp_type->
code () != TYPE_CODE_PTR
3041 switch (match_quality)
3060 const char *func_name,
3061 const char *qualified_name,
3062 std::vector<symbol *> *oload_syms,
3071 oload_syms, oload_champ_bv,
3086 const char *func_name,
3087 const char *qualified_name,
3089 std::vector<symbol *> *oload_syms,
3094 int next_namespace_len = namespace_len;
3095 int searched_deeper = 0;
3096 int new_oload_champ;
3097 char *new_namespace;
3099 if (next_namespace_len != 0)
3101 gdb_assert (qualified_name[next_namespace_len] ==
':');
3102 next_namespace_len += 2;
3104 next_namespace_len +=
3110 if (qualified_name[next_namespace_len] ==
':')
3112 searched_deeper = 1;
3115 func_name, qualified_name,
3117 oload_syms, oload_champ_bv,
3118 oload_champ, no_adl))
3132 new_namespace = (
char *) alloca (namespace_len + 1);
3133 strncpy (new_namespace, qualified_name, namespace_len);
3134 new_namespace[namespace_len] =
'\0';
3136 std::vector<symbol *> new_oload_syms
3141 if (!searched_deeper && !no_adl)
3144 struct type **arg_types;
3147 arg_types = (
struct type **)
3148 alloca (args.size () * (
sizeof (
struct type *)));
3149 for (ix = 0; ix < args.size (); ix++)
3150 arg_types[ix] = args[ix]->
type ();
3157 new_oload_syms.size (),
3158 NULL, NULL, new_oload_syms.data (),
3159 &new_oload_champ_bv);
3168 if (new_oload_champ != -1
3171 *oload_syms = std::move (new_oload_syms);
3172 *oload_champ = new_oload_champ;
3173 *oload_champ_bv = std::move (new_oload_champ_bv);
3176 else if (searched_deeper)
3182 *oload_syms = std::move (new_oload_syms);
3183 *oload_champ = new_oload_champ;
3184 *oload_champ_bv = std::move (new_oload_champ_bv);
3211 int oload_champ = -1;
3213 int oload_ambiguous = 0;
3219 gdb_assert ((methods != NULL) + (functions != NULL) + (xmethods != NULL)
3223 for (
size_t ix = 0; ix < num_fns; ix++)
3226 int static_offset = 0;
3227 std::vector<type *> parm_types;
3229 if (xmethods != NULL)
3230 parm_types = xmethods[ix]->get_arg_types ();
3235 if (methods != NULL)
3243 parm_types.reserve (nparms);
3244 for (jj = 0; jj < nparms; jj++)
3246 type *t = (methods != NULL
3249 parm_types.push_back (t);
3256 args.slice (static_offset));
3260 if (methods != NULL)
3262 "Overloaded method instance %s, # of parms %d\n",
3263 methods[ix].physname, (
int) parm_types.size ());
3264 else if (xmethods != NULL)
3266 "Xmethod worker, # of parms %d\n",
3267 (
int) parm_types.size ());
3270 "Overloaded function instance "
3271 "%s # of parms %d\n",
3272 functions[ix]->demangled_name (),
3273 (
int) parm_types.size ());
3276 "...Badness of length : {%d, %d}\n",
3277 bv[0].
rank, bv[0].subrank);
3279 for (jj = 1; jj < bv.size (); jj++)
3281 "...Badness of arg %d : {%d, %d}\n",
3282 jj, bv[jj].
rank, bv[jj].subrank);
3285 if (oload_champ_bv->empty ())
3287 *oload_champ_bv = std::move (bv);
3295 oload_ambiguous = 1;
3298 oload_ambiguous = 2;
3301 *oload_champ_bv = std::move (bv);
3302 oload_ambiguous = 0;
3311 "champion is %d, ambiguous? %d\n",
3312 oload_champ, oload_ambiguous);
3340 for (ix = 1; ix <= nargs - static_offset; ix++)
3371 const char *cp = strchr (dname,
'<');
3376 len = strlen (dname);
3379 if (strlen (
name + 1) != len || strncmp (dname,
name + 1, len) != 0)
3380 error (_(
"name of destructor must equal name of class"));
3391static struct value *
3395 int name_len = strlen (
name);
3397 gdb_assert (
type->
code () == TYPE_CODE_ENUM
3411 len = strlen (fname);
3412 if (len + 2 >= name_len
3413 && fname[len - name_len - 2] ==
':'
3414 && fname[len - name_len - 1] ==
':'
3415 && strcmp (&fname[len - name_len],
name) == 0)
3419 error (_(
"no constant named \"%s\" in enum \"%s\""),
3431 struct type *expect_type,
int want_address,
3434 switch (curtype->
code ())
3436 case TYPE_CODE_STRUCT:
3437 case TYPE_CODE_UNION:
3441 case TYPE_CODE_NAMESPACE:
3445 case TYPE_CODE_ENUM:
3449 internal_error (_(
"non-aggregate type in value_aggregate_elt"));
3472 if (skip_artificial)
3474 while (start < t1->num_fields ()
3514 struct value *v,
int *boffs,
bool *isvirt)
3535 if (*isvirt ==
false)
3555static struct value *
3557 struct type *curtype,
const char *
name,
3558 struct type *intype,
3564 struct value *result;
3566 if (t->
code () != TYPE_CODE_STRUCT
3567 && t->
code () != TYPE_CODE_UNION)
3568 error (_(
"Internal error: non-aggregate type "
3569 "to value_struct_elt_for_reference"));
3573 const char *t_field_name = t->
field (i).
name ();
3575 if (t_field_name && strcmp (t_field_name,
name) == 0)
3585 error (_(
"pointers to bitfield members not allowed"));
3601 struct value *ptr, *this_v = v;
3607 gdb_assert (
type != NULL
3608 &&
type->
code () == TYPE_CODE_MEMBERPTR);
3612 if (domain != curtype)
3617 bool isvirt =
false;
3636 error (_(
"Cannot reference non-static field \"%s\""),
name);
3645 while (intype && intype->
code () == TYPE_CODE_PTR)
3652 if (t_field_name && strcmp (t_field_name,
name) == 0)
3662 for (j = 0; j < len; ++j)
3676 error (_(
"no member function matches "
3677 "that type instantiation"));
3684 for (ii = 0; ii < len; ++ii)
3702 error (_(
"non-unique member `%s' requires "
3703 "type instantiation"),
name);
3709 error (_(
"no matching member function"));
3740 error (_(
"Cannot reference virtual member function \"%s\""),
3795static struct value *
3797 const char *
name,
int want_address,
3805 error (_(
"No symbol \"%s\" in namespace \"%s\"."),
3817static struct value *
3819 const char *
name,
int want_address,
3824 struct value *result;
3850 LONGEST *top,
int *using_enc)
3852 struct value *target = NULL;
3859 else if (
type->
code () == TYPE_CODE_PTR)
3866 catch (
const gdb_exception_error &except)
3868 if (except.error == MEMORY_ERROR)
3891 else if (
type->
code () == TYPE_CODE_PTR)
3894 internal_error (_(
"Unexpected value type."));
3917 int xfull,
int xtop,
3920 struct type *real_type;
3924 struct value *new_val;
3931 using_enc = xusing_enc;
3952 argp = argp->
copy ();
3960 warning (_(
"Couldn't retrieve complete object of RTTI "
3961 "type %s; object may be in register(s)."),
3962 real_type->
name ());
3988 const struct block *b;
3992 error (_(
"no `this' in current language"));
4000 error (_(
"current stack frame does not contain a variable named `%s'"),
4012 struct value *ret = NULL;
4018 catch (
const gdb_exception_error &except)
4032 struct type *slice_range_type, *slice_type, *range_type;
4033 LONGEST lowerbound, upperbound;
4034 struct value *slice;
4035 struct type *array_type;
4038 if (array_type->
code () != TYPE_CODE_ARRAY
4039 && array_type->
code () != TYPE_CODE_STRING)
4040 error (_(
"cannot take slice of non-array"));
4043 error (_(
"array not allocated"));
4045 error (_(
"array not associated"));
4049 error (_(
"slice from bad array or bitstring"));
4051 if (lowbound < lowerbound ||
length < 0
4052 || lowbound +
length - 1 > upperbound)
4053 error (_(
"slice out of range"));
4103 int len = real_type->
length ();
4121 gdb_assert (
type->
code () == TYPE_CODE_COMPLEX);
4133 gdb_assert (
type->
code () == TYPE_CODE_COMPLEX);
4140static struct value *
4145 if (val->
type ()->
code () == TYPE_CODE_COMPLEX)
4150 int len = val_real_type->
length ();
4159 else if (val->
type ()->
code () == TYPE_CODE_FLT
4160 || val->
type ()->
code () == TYPE_CODE_INT)
4165 error (_(
"cannot cast non-number to complex"));
4174Set overload resolution in evaluating C++ functions."), _(
"\
4175Show overload resolution in evaluating C++ functions."),
const struct block * get_frame_block(frame_info_ptr frame, CORE_ADDR *addr_in_block)
const std::string & string()
struct cmd_list_element * showlist
struct cmd_list_element * setlist
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
void write_memory_with_notification(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
void memory_error(enum target_xfer_status err, CORE_ADDR memaddr)
struct value * value_virtual_fn_field(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
void cplus_make_method_ptr(struct type *type, gdb_byte *contents, CORE_ADDR value, int is_virtual)
int baseclass_offset(struct type *type, int index, const gdb_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val)
struct type * value_rtti_type(struct value *v, int *full, LONGEST *top, int *using_enc)
struct block_symbol cp_lookup_symbol_namespace(const char *scope, const char *name, const struct block *block, const domain_enum domain)
gdb::unique_xmalloc_ptr< char > cp_func_name(const char *full_name)
void add_symbol_overload_list_adl(gdb::array_view< type * > arg_types, const char *func_name, std::vector< symbol * > *overload_list)
unsigned int cp_find_first_component(const char *name)
struct std::vector< symbol * > make_symbol_overload_list(const char *func_name, const char *the_namespace)
@ lval_internalvar_component
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
@ EVAL_AVOID_SIDE_EFFECTS
void get_matching_xmethod_workers(struct type *type, const char *method_name, std::vector< xmethod_worker_up > *workers)
std::unique_ptr< xmethod_worker > xmethod_worker_up
int symbol_read_needs_frame(struct symbol *sym)
struct value * read_var_value(struct symbol *var, const struct block *var_block, frame_info_ptr frame)
frame_info_ptr deprecated_safe_get_selected_frame(void)
void select_frame(frame_info_ptr fi)
frame_info_ptr get_prev_frame_always(frame_info_ptr this_frame)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
void put_frame_register_bytes(frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view< const gdb_byte > buffer)
frame_info_ptr get_selected_frame(const char *message)
frame_info_ptr frame_find_by_id(struct frame_id id)
bool get_frame_register_bytes(frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view< gdb_byte > buffer, int *optimizedp, int *unavailablep)
struct frame_id get_frame_id(frame_info_ptr fi)
const struct block * get_selected_block(CORE_ADDR *addr_in_block)
void gdbarch_value_to_register(struct gdbarch *gdbarch, frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *buf)
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
int gdbarch_addressable_memory_unit_size(struct gdbarch *gdbarch)
int gdbarch_convert_register_p(struct gdbarch *gdbarch, int regnum, struct type *type)
enum bfd_endian type_byte_order(const struct type *type)
void check_stub_method_group(struct type *type, int method_id)
struct type * lookup_pointer_type(struct type *type)
struct type * create_static_range_type(type_allocator &alloc, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
struct type * lookup_methodptr_type(struct type *to_type)
int is_integral_type(struct type *t)
int is_floating_type(struct type *t)
const struct rank NS_POINTER_CONVERSION_BADNESS
struct rank rank_one_type(struct type *parm, struct type *arg, struct value *value)
struct type * lookup_array_range_type(struct type *element_type, LONGEST low_bound, LONGEST high_bound)
const struct rank INCOMPATIBLE_TYPE_BADNESS
struct type * make_cv_type(int cnst, int voltl, struct type *type, struct type **typeptr)
bool get_discrete_bounds(struct type *type, LONGEST *lowp, LONGEST *highp)
struct type * lookup_function_type(struct type *type)
badness_vector rank_function(gdb::array_view< type * > parms, gdb::array_view< value * > args)
int compare_ranks(struct rank a, struct rank b)
struct type * lookup_reference_type(struct type *type, enum type_code refcode)
int is_unique_ancestor(struct type *base, struct value *val)
struct type * lookup_memberptr_type(struct type *type, struct type *domain)
struct type * lookup_string_range_type(struct type *string_char_type, LONGEST low_bound, LONGEST high_bound)
bool get_array_bounds(struct type *type, LONGEST *low_bound, LONGEST *high_bound)
unsigned int overload_debug
int compare_badness(const badness_vector &a, const badness_vector &b)
int is_ancestor(struct type *base, struct type *dclass)
struct type * create_array_type(type_allocator &alloc, struct type *element_type, struct type *range_type)
int is_public_ancestor(struct type *base, struct type *dclass)
int type_not_associated(const struct type *type)
unsigned int type_length_units(struct type *type)
bool types_equal(struct type *a, struct type *b)
bool types_deeply_equal(struct type *type1, struct type *type2)
const struct rank EXACT_MATCH_BADNESS
int class_types_same_p(const struct type *a, const struct type *b)
bool is_fixed_point_type(struct type *type)
int type_not_allocated(const struct type *type)
const char * type_name_or_error(struct type *type)
struct type * check_typedef(struct type *type)
#define TYPE_BASECLASS_NAME(thistype, index)
#define TYPE_FN_FIELD_PHYSNAME(thisfn, n)
#define TYPE_NFN_FIELDS(thistype)
#define TYPE_FN_FIELD_ARGS(thisfn, n)
#define TYPE_IS_REFERENCE(t)
#define TYPE_FN_FIELD_VOFFSET(thisfn, n)
#define TYPE_FN_FIELDLIST1(thistype, n)
#define TYPE_SAFE_NAME(type)
#define TYPE_SELF_TYPE(thistype)
#define TYPE_FN_FIELD_TYPE(thisfn, n)
#define TYPE_FN_FIELD_VOLATILE(thisfn, n)
#define TYPE_BASECLASS(thistype, index)
#define TYPE_FN_FIELD_VIRTUAL_P(thisfn, n)
#define TYPE_BASECLASS_BITPOS(thistype, index)
#define TYPE_FN_FIELDLIST_LENGTH(thistype, n)
#define TYPE_FN_FIELD_STATIC_P(thisfn, n)
#define BASETYPE_VIA_VIRTUAL(thistype, index)
#define TYPE_FN_FIELDLIST_NAME(thistype, n)
#define TYPE_FN_FIELD_ARTIFICIAL(thisfn, n)
#define BASETYPE_VIA_PUBLIC(thistype, index)
#define TYPE_N_BASECLASSES(thistype)
std::vector< rank > badness_vector
#define TYPE_FN_FIELD_CONST(thisfn, n)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t err
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type, struct type **function_type)
struct value * call_function_by_hand(struct value *function, type *default_return_type, gdb::array_view< value * > args)
struct inferior * current_inferior(void)
const struct language_defn * current_language
struct bound_minimal_symbol lookup_bound_minimal_symbol(const char *name)
observable< struct target_ops * > target_changed
observable< frame_info_ptr, int > register_changed
static const char * namespace_name(struct die_info *die, int *is_anonymous, struct dwarf2_cu *)
const struct block * block
CORE_ADDR value_address() const
struct minimal_symbol * minsym
dynamic_prop_kind kind() const
LONGEST loc_bitpos() const
bool is_artificial() const
field_loc_kind loc_kind() const
LONGEST loc_enumval() const
const char * name() const
struct type * type() const
void read_fixed_point(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order, bool unsigned_p, const gdb_mpq &scaling_factor)
gdb_mpz get_rounded() const
void read(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order, bool unsigned_p)
void write(gdb::array_view< gdb_byte > buf, enum bfd_endian byte_order, bool unsigned_p) const
const char * natural_name() const
const char * print_name() const
enum language la_language
virtual const char * name_of_this() const
virtual void print_type(struct type *type, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags) const =0
virtual char string_lower_bound() const
virtual bool c_style_arrays_p() const
void(* write)(struct value *toval, struct value *fromval)
struct value *(* indirect)(struct value *value)
struct gdbarch * arch() const
struct value * field_value
std::vector< struct type * > path
struct value * baseclass()
void search(struct value *arg, LONGEST offset, struct type *type)
void update_result(struct value *v, LONGEST boffset)
struct type * m_outermost_type
const std::vector< found_field > & fields()
std::vector< struct type * > m_struct_path
std::vector< found_field > m_fields
const bool m_looking_for_baseclass
struct value * m_baseclass
struct_field_searcher(const char *name, struct type *outermost_type, bool looking_for_baseclass)
address_class aclass() const
struct type * type() const
struct objfile * objfile() const
struct type * target_type() const
void set_code(type_code code)
struct field & field(int idx) const
bool is_declared_class() const
unsigned int num_fields() const
const gdb_mpq & fixed_point_scaling_factor()
bool is_pointer_or_reference() const
range_bounds * bounds() const
const char * name() const
type * index_type() const
static struct value * from_xmethod(xmethod_worker_up &&worker)
static struct value * zero(struct type *type, enum lval_type lv)
struct value * primitive_field(LONGEST offset, int fieldno, struct type *arg_type)
gdb::array_view< const gdb_byte > contents_all()
const struct lval_funcs * funcs
void contents_copy(struct value *dst, LONGEST dst_offset, LONGEST src_offset, LONGEST length)
bool deprecated_modifiable() const
struct value * copy() const
struct gdbarch * arch() const
gdb::array_view< gdb_byte > contents_writeable()
static struct value * allocate(struct type *type)
void set_enclosing_type(struct type *new_type)
void set_embedded_offset(LONGEST val)
struct type * enclosing_type() const
void set_lval(lval_type val)
const struct lval_funcs * computed_funcs() const
LONGEST embedded_offset() const
gdb::array_view< const gdb_byte > contents()
LONGEST pointed_to_offset() const
void set_address(CORE_ADDR)
void set_component_location(const struct value *whole)
gdb::array_view< gdb_byte > contents_raw()
struct type * type() const
void set_offset(LONGEST offset)
void set_pointed_to_offset(LONGEST val)
void mark_bits_unavailable(LONGEST offset, ULONGEST length)
enum lval_type lval() const
gdb::array_view< gdb_byte > contents_all_raw()
void deprecated_set_type(struct type *type)
static struct value * allocate_lazy(struct type *type)
bool bits_synthetic_pointer(LONGEST offset, LONGEST length) const
gdb::array_view< const gdb_byte > contents_for_printing()
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)
struct block_symbol lookup_language_this(const struct language_defn *lang, const struct block *block)
void target_float_convert(const gdb_byte *from, const struct type *from_type, gdb_byte *to, const struct type *to_type)
double target_float_to_host_double(const gdb_byte *addr, const struct type *type)
void target_float_from_host_double(gdb_byte *addr, const struct type *type, double val)
bool target_has_execution(inferior *inf)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
target_xfer_partial_ftype target_xfer_partial
@ TARGET_XFER_UNAVAILABLE
@ TARGET_OBJECT_STACK_MEMORY
const struct type_print_options type_print_raw_options
void gdb_printf(struct ui_file *stream, const char *format,...)
int strcmp_iw(const char *string1, const char *string2)
bool value_logical_not(struct value *arg1)
struct value * value_coerce_to_target(struct value *val)
void read_value_memory(struct value *val, LONGEST bit_offset, bool stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length)
static struct value * value_namespace_elt(const struct type *, const char *, int, enum noside)
struct value * value_cast_pointers(struct type *type, struct value *arg2, int subclass_check)
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)
static enum oload_classification classify_oload_match(const badness_vector &, int, int)
static int compare_parameters(struct type *t1, struct type *t2, int skip_artificial)
struct value * value_at_lazy(struct type *type, CORE_ADDR addr, frame_info_ptr frame)
struct value * value_at(struct type *type, CORE_ADDR addr)
static struct value * search_struct_method(const char *, struct value **, gdb::optional< gdb::array_view< value * > >, LONGEST, int *, struct type *)
static struct value * value_maybe_namespace_elt(const struct type *, const char *, int, enum noside)
struct value * value_slice(struct value *array, int lowbound, int length)
static int typecmp(bool staticp, bool varargs, int nargs, struct field t1[], const gdb::array_view< value * > t2)
static struct value * value_cast_to_fixed_point(struct type *to_type, struct value *from_val)
static bool get_baseclass_offset(struct type *vt, struct type *cls, struct value *v, int *boffs, bool *isvirt)
struct value * value_aggregate_elt(struct type *curtype, const char *name, struct type *expect_type, int want_address, enum noside noside)
struct value * value_of_this_silent(const struct language_defn *lang)
struct value * value_at_non_lval(struct type *type, CORE_ADDR addr)
struct value * value_allocate_space_in_inferior(int len)
struct type * value_rtti_indirect_type(struct value *v, int *full, LONGEST *top, int *using_enc)
static int find_oload_champ(gdb::array_view< value * > args, size_t num_fns, fn_field *methods, xmethod_worker_up *xmethods, symbol **functions, badness_vector *oload_champ_bv)
struct value * value_full_object(struct value *argp, struct type *rtype, int xfull, int xtop, int xusing_enc)
struct value * value_one(struct type *type)
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)
static int oload_method_static_p(struct fn_field *, int)
struct value * value_coerce_array(struct value *arg1)
static void show_overload_resolution(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void _initialize_valops()
struct value * value_struct_elt(struct value **argp, gdb::optional< gdb::array_view< value * > > args, const char *name, int *static_memfuncp, const char *err)
struct value * value_of_variable(struct symbol *var, const struct block *b)
struct value * value_addr(struct value *arg1)
static struct value * value_struct_elt_for_reference(struct type *, int, struct type *, const char *, struct type *, int, enum noside)
struct value * value_repeat(struct value *arg1, int count)
static CORE_ADDR allocate_space_in_inferior(int)
static struct value * cast_into_complex(struct type *, struct value *)
struct value * value_array(int lowbound, gdb::array_view< struct value * > elemvec)
struct value * find_function_in_inferior(const char *name, struct objfile **objf_p)
struct value * value_cast(struct type *type, struct value *arg2)
static struct value * enum_constant_from_type(struct type *type, const char *name)
static void value_find_oload_method_list(struct value **argp, const char *method, LONGEST offset, gdb::array_view< fn_field > *methods, std::vector< xmethod_worker_up > *xmethods, struct type **basetype, LONGEST *boffset)
struct value * value_assign(struct value *toval, struct value *fromval)
static struct value * get_value_at(struct type *type, CORE_ADDR addr, frame_info_ptr frame, int lazy)
struct value * value_real_part(struct value *value)
struct value * value_coerce_function(struct value *arg1)
bool value_must_coerce_to_target(struct value *val)
struct value * value_ind(struct value *arg1)
struct value * value_literal_complex(struct value *arg1, struct value *arg2, struct type *type)
static void find_method_list(struct value **argp, const char *method, LONGEST offset, struct type *type, gdb::array_view< fn_field > *methods, std::vector< xmethod_worker_up > *xmethods, struct type **basetype, LONGEST *boffset)
struct value * value_struct_elt_bitpos(struct value **argp, int bitpos, struct type *ftype, const char *err)
static struct value * search_struct_field(const char *, struct value *, struct type *, int)
static struct value * value_cast_structs(struct type *type, struct value *v2)
struct value * value_cstring(const gdb_byte *ptr, ssize_t count, struct type *char_type)
struct value * value_ref(struct value *arg1, enum type_code refcode)
struct value * value_dynamic_cast(struct type *type, struct value *arg)
static int find_oload_champ_namespace_loop(gdb::array_view< value * > args, const char *, const char *, int, std::vector< symbol * > *oload_syms, badness_vector *, int *, const int no_adl)
struct value * address_of_variable(struct symbol *var, const struct block *b)
gdb_mpq value_to_gdb_mpq(struct value *value)
static int find_oload_champ_namespace(gdb::array_view< value * > args, const char *, const char *, std::vector< symbol * > *oload_syms, badness_vector *, const int no_adl)
struct value * value_of_this(const struct language_defn *lang)
struct value * value_imaginary_part(struct value *value)
int destructor_name_p(const char *name, struct type *type)
struct value * value_reinterpret_cast(struct type *type, struct value *arg)
int find_overload_match(gdb::array_view< value * > args, 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)
struct value * value_string(const gdb_byte *ptr, ssize_t count, struct type *char_type)
static std::string incomplete_type_hint(gdb::array_view< value * > args)
struct value * value_from_component(struct value *whole, struct type *type, LONGEST offset)
struct value * value_of_internalvar(struct gdbarch *gdbarch, struct internalvar *var)
bool is_floating_value(struct value *val)
CORE_ADDR value_as_address(struct value *val)
struct value * value_from_ulongest(struct type *type, ULONGEST num)
struct value * value_static_field(struct type *type, int fieldno)
struct value * value_from_longest(struct type *type, LONGEST num)
struct value * coerce_ref(struct value *arg)
struct value * coerce_array(struct value *arg)
void set_internalvar(struct internalvar *var, struct value *val)
void set_internalvar_component(struct internalvar *var, LONGEST offset, LONGEST bitpos, LONGEST bitsize, struct value *newval)
struct value * value_fn_field(struct value **arg1p, struct fn_field *f, int j, struct type *type, LONGEST offset)
LONGEST value_as_long(struct value *val)
void modify_field(struct type *type, gdb_byte *addr, LONGEST fieldval, LONGEST bitpos, LONGEST bitsize)
gdb_mpz value_as_mpz(struct value *val)
struct value * value_from_mpz(struct type *type, const gdb_mpz &v)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
struct value * readjust_indirect_value_type(struct value *value, struct type *enc_type, const struct type *original_type, struct value *original_value, CORE_ADDR original_value_address)
struct value * allocate_repeat_value(struct type *type, int count)
struct value * value_from_contents_and_address(struct type *type, const gdb_byte *valaddr, CORE_ADDR address, frame_info_ptr frame)
#define VALUE_NEXT_FRAME_ID(val)
#define VALUE_REGNUM(val)
#define VALUE_INTERNALVAR(val)