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;
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?");
347 mpq_set_d (result.
val, d);
357 mpq_set_z (result.
val, vz.
val);
360 mpq_mul (result.
val, result.
val,
375 if (from_type == to_type)
381 error (_(
"Invalid conversion from type %s to fixed point type %s"),
382 from_type->
name (), to_type->
name ());
415 int convert_to_boolean = 0;
474 if (code1 == TYPE_CODE_ARRAY)
482 int val_length = type2->
length ();
483 LONGEST low_bound, high_bound, new_length;
486 low_bound = 0, high_bound = 0;
487 new_length = val_length / element_length;
488 if (val_length % element_length != 0)
489 warning (_(
"array element type size does not "
490 "divide object size in cast"));
496 new_length + low_bound - 1);
506 && type2->
code () == TYPE_CODE_ARRAY
510 if (type2->
code () == TYPE_CODE_FUNC)
514 code2 = type2->
code ();
516 if (code1 == TYPE_CODE_COMPLEX)
518 if (code1 == TYPE_CODE_BOOL)
520 code1 = TYPE_CODE_INT;
521 convert_to_boolean = 1;
523 if (code1 == TYPE_CODE_CHAR)
524 code1 = TYPE_CODE_INT;
525 if (code2 == TYPE_CODE_BOOL || code2 == TYPE_CODE_CHAR)
526 code2 = TYPE_CODE_INT;
528 scalar = (code2 == TYPE_CODE_INT || code2 == TYPE_CODE_FLT
529 || code2 == TYPE_CODE_DECFLOAT || code2 == TYPE_CODE_ENUM
530 || code2 == TYPE_CODE_RANGE
533 if ((code1 == TYPE_CODE_STRUCT || code1 == TYPE_CODE_UNION)
534 && (code2 == TYPE_CODE_STRUCT || code2 == TYPE_CODE_UNION)
563 to_type, mpq_get_d (fp_val.
val));
573 else if ((code1 == TYPE_CODE_INT || code1 == TYPE_CODE_ENUM
574 || code1 == TYPE_CODE_RANGE)
575 && (scalar || code2 == TYPE_CODE_PTR
576 || code2 == TYPE_CODE_MEMBERPTR))
586 if (code2 == TYPE_CODE_PTR)
592 (LONGEST) (longest ? 1 : 0) : longest);
594 else if (code1 == TYPE_CODE_PTR && (code2 == TYPE_CODE_INT
595 || code2 == TYPE_CODE_ENUM
596 || code2 == TYPE_CODE_RANGE))
611 if (addr_bit <
sizeof (LONGEST) * HOST_CHAR_BIT)
613 if (longest >= ((LONGEST) 1 << addr_bit)
614 || longest <= -((LONGEST) 1 << addr_bit))
615 warning (_(
"value truncated"));
619 else if (code1 == TYPE_CODE_METHODPTR && code2 == TYPE_CODE_INT
628 else if (code1 == TYPE_CODE_MEMBERPTR && code2 == TYPE_CODE_INT
636 && code2 == TYPE_CODE_ARRAY && type2->
is_vector ()
638 error (_(
"Cannot convert between vector values of different sizes"));
639 else if (code1 == TYPE_CODE_ARRAY &&
type->
is_vector () && scalar
641 error (_(
"can only cast scalar to vector of same size"));
642 else if (code1 == TYPE_CODE_VOID)
648 if (code1 == TYPE_CODE_PTR && code2 == TYPE_CODE_PTR)
662 error (_(
"Invalid type conversion."));
663 error (_(
"Invalid cast."));
672 struct value *result;
674 struct type *arg_type, *dest_type;
696 dest_code = real_type->
code ();
697 arg_code = arg_type->
code ();
701 if ((dest_code == TYPE_CODE_PTR && arg_code == TYPE_CODE_INT)
702 || (dest_code == TYPE_CODE_INT && arg_code == TYPE_CODE_PTR)
703 || (dest_code == TYPE_CODE_METHODPTR && arg_code == TYPE_CODE_INT)
704 || (dest_code == TYPE_CODE_INT && arg_code == TYPE_CODE_METHODPTR)
705 || (dest_code == TYPE_CODE_MEMBERPTR && arg_code == TYPE_CODE_INT)
706 || (dest_code == TYPE_CODE_INT && arg_code == TYPE_CODE_MEMBERPTR)
707 || (dest_code == arg_code
708 && (dest_code == TYPE_CODE_PTR
709 || dest_code == TYPE_CODE_METHODPTR
710 || dest_code == TYPE_CODE_MEMBERPTR)))
713 error (_(
"Invalid reinterpret_cast"));
729 const gdb_byte *valaddr,
730 LONGEST embedded_offset,
733 struct type *search_type,
735 struct type *arg_type,
736 struct value **result)
738 int i, result_count = 0;
748 if (address + embedded_offset + offset >= arg_addr
749 && address + embedded_offset + offset < arg_addr + arg_type->
length ())
754 address + embedded_offset + offset);
760 embedded_offset + offset,
777 const gdb_byte *valaddr,
778 LONGEST embedded_offset,
781 struct type *search_type,
782 struct value **result)
784 int i, result_count = 0;
800 address + embedded_offset + offset);
805 embedded_offset + offset,
823 struct type *class_type, *rtti_type;
824 struct value *result, *tem, *original_arg = arg;
828 if (resolved_type->
code () != TYPE_CODE_PTR
830 error (_(
"Argument to dynamic_cast must be a pointer or reference type"));
833 error (_(
"Argument to dynamic_cast must be pointer to class or `void *'"));
836 if (resolved_type->
code () == TYPE_CODE_PTR)
838 if (arg_type->
code () != TYPE_CODE_PTR
839 && ! (arg_type->
code () == TYPE_CODE_INT
841 error (_(
"Argument to dynamic_cast does not have pointer type"));
842 if (arg_type->
code () == TYPE_CODE_PTR)
845 if (arg_type->
code () != TYPE_CODE_STRUCT)
846 error (_(
"Argument to dynamic_cast does "
847 "not have pointer to class type"));
858 if (arg_type->
code () != TYPE_CODE_STRUCT)
859 error (_(
"Argument to dynamic_cast does not have class type"));
872 error (_(
"Ambiguous dynamic_cast"));
877 error (_(
"Couldn't determine value's most derived type for dynamic_cast"));
892 if (resolved_type->
code () == TYPE_CODE_PTR
925 rtti_type, &result) == 1)
931 if (resolved_type->
code () == TYPE_CODE_PTR)
934 error (_(
"dynamic_cast failed"));
949 else if (type1->
code () == TYPE_CODE_ARRAY && type1->
is_vector ())
953 LONGEST low_bound, high_bound;
956 error (_(
"Could not determine the vector bounds"));
960 int elt_len = eltype->
length ();
962 for (i = 0; i < high_bound - low_bound + 1; i++)
966 val_contents.slice (i * elt_len, elt_len));
971 error (_(
"Not a numeric type."));
991 error (_(
"Attempt to dereference a generic pointer."));
1035 int stack, CORE_ADDR memaddr,
1036 gdb_byte *buffer,
size_t length)
1038 ULONGEST xfered_total = 0;
1045 while (xfered_total < length)
1048 ULONGEST xfered_partial;
1052 buffer + xfered_total * unit_size, NULL,
1053 memaddr + xfered_total,
1054 length - xfered_total,
1062 xfered_partial * HOST_CHAR_BIT);
1068 xfered_total += xfered_partial;
1084 error (_(
"Left operand of assignment is not a modifiable lvalue."));
1139 const gdb_byte *dest_buffer;
1140 CORE_ADDR changed_addr;
1142 gdb_byte buffer[
sizeof (LONGEST)];
1151 + HOST_CHAR_BIT - 1)
1158 if (changed_len < type->length ()
1160 && ((LONGEST) changed_addr %
type->
length ()) == 0)
1163 if (changed_len > (
int)
sizeof (LONGEST))
1164 error (_(
"Can't handle bitfields which "
1165 "don't fit in a %d bit word."),
1166 (
int)
sizeof (LONGEST) * HOST_CHAR_BIT);
1171 dest_buffer = buffer;
1203 error (_(
"Value being assigned to is no longer active."));
1212 gdb_byte buffer[
sizeof (LONGEST)];
1217 + HOST_CHAR_BIT - 1)
1220 if (changed_len >
sizeof (LONGEST))
1221 error (_(
"Can't handle bitfields which "
1222 "don't fit in a %d bit word."),
1223 (int)
sizeof (LONGEST) * HOST_CHAR_BIT);
1226 {buffer, changed_len},
1230 throw_error (OPTIMIZED_OUT_ERROR,
1231 _(
"value has been optimized out"));
1233 throw_error (NOT_AVAILABLE_ERROR,
1234 _(
"value is not available"));
1241 {buffer, changed_len});
1269 if (funcs->
write != NULL)
1271 funcs->
write (toval, fromval);
1278 error (_(
"Left operand of assignment is not an lvalue."));
1323 LONGEST valmask = (((ULONGEST) 1) <<
value_bitsize (toval)) - 1;
1325 fieldval &= valmask;
1327 && (fieldval & (valmask ^ (valmask >> 1))))
1328 fieldval |= ~valmask;
1344 if (
type->
code () == TYPE_CODE_PTR)
1361 error (_(
"Only values in memory can be extended with '@'."));
1363 error (_(
"Invalid number %d of repetitions."), count);
1401 ||
type->
code () == TYPE_CODE_FUNC)
1414 const char *regname;
1421 gdb_assert (regname !=
nullptr && *regname !=
'\0');
1423 error (_(
"Address requested for identifier "
1424 "\"%s\" which is in register $%s"),
1430 error (_(
"Can't take address of \"%s\" which isn't an lvalue."),
1443 struct type *valtype;
1453 switch (valtype->
code ())
1455 case TYPE_CODE_ARRAY:
1457 case TYPE_CODE_STRING:
1517 error (_(
"Attempt to take address of value not located in memory."));
1529 struct value *retval;
1532 error (_(
"Attempt to take address of value not located in memory."));
1559 struct type *type_ptr
1561 struct type *enclosing_type
1563 struct type *enclosing_type_ptr
1573 if (
type->
code () == TYPE_CODE_FUNC)
1581 error (_(
"Attempt to take address of value not located in memory."));
1607 gdb_assert (refcode == TYPE_CODE_REF || refcode == TYPE_CODE_RVALUE_REF);
1609 if ((
type->
code () == TYPE_CODE_REF
1610 ||
type->
code () == TYPE_CODE_RVALUE_REF)
1625 struct type *base_type;
1645 if (base_type->
code () == TYPE_CODE_PTR)
1647 struct type *enc_type;
1654 CORE_ADDR base_addr;
1674 error (_(
"Attempt to take contents of a non-pointer value."));
1692 ULONGEST typelength;
1694 struct type *arraytype;
1699 nelem = highbound - lowbound + 1;
1702 error (_(
"bad array bounds (%d, %d)"), lowbound, highbound);
1705 for (idx = 1; idx < nelem; idx++)
1710 error (_(
"array elements must all be the same size"));
1715 lowbound, highbound);
1720 for (idx = 0; idx < nelem; idx++)
1730 for (idx = 0; idx < nelem; idx++)
1740 ssize_t highbound = len / char_type->
length ();
1741 struct type *stringtype
1763 ssize_t highbound = len / char_type->
length ();
1764 struct type *stringtype
1792 struct field t1[], gdb::array_view<value *> t2)
1802 (i < nargs) && t1[i].
type ()->
code () != TYPE_CODE_VOID;
1805 struct type *tt1, *tt2;
1807 if (i == t2.size ())
1818 if (tt2->
code () == TYPE_CODE_ARRAY)
1835 while (tt2->
code () == TYPE_CODE_ARRAY
1836 || tt2->
code () == TYPE_CODE_PTR
1852 if (varargs || i == t2.size ())
1876 struct type *outermost_type,
1877 bool looking_for_baseclass)
1945 error (_(
"base class '%s' is ambiguous in type '%s'"),
1965 bool ambiguous =
false, insert =
true;
1982 if (ambiguous && insert)
2024 && t_field_name[0] ==
'\0')
2028 if (field_type->
code () == TYPE_CODE_UNION
2029 || field_type->
code () == TYPE_CODE_STRUCT)
2043 LONGEST new_offset = offset;
2051 if (field_type->
code () == TYPE_CODE_STRUCT
2056 search (arg1, new_offset, field_type);
2061 for (i = 0; i < nbases; i++)
2063 struct value *v = NULL;
2091 CORE_ADDR base_addr;
2098 error (_(
"virtual baseclass botch"));
2107 if (found_baseclass)
2112 else if (found_baseclass)
2131static struct value *
2133 struct type *
type,
int looking_for_baseclass)
2139 if (!looking_for_baseclass)
2141 const auto &fields = searcher.
fields ();
2143 if (fields.empty ())
2145 else if (fields.size () == 1)
2146 return fields[0].field_value;
2149 std::string candidates;
2151 for (
auto &&candidate : fields)
2153 gdb_assert (!candidate.path.empty ());
2156 struct type *struct_type = candidate.path.back ();
2160 for (
struct type *t : candidate.path)
2169 candidates += string_printf (
"\n '%s %s::%s' (%s)",
2176 error (_(
"Request for member '%s' is ambiguous in type '%s'."
2177 " Candidates are:%s"),
2179 candidates.c_str ());
2198static struct value *
2200 gdb::optional<gdb::array_view<value *>> args,
2201 LONGEST
offset,
int *static_memfuncp,
2206 int name_matched = 0;
2220 if (j > 0 && !args.has_value ())
2221 error (_(
"cannot resolve overloaded method "
2222 "`%s': no arguments supplied"),
name);
2223 else if (j == 0 && !args.has_value ())
2232 gdb_assert (args.has_value ());
2243 *static_memfuncp = 1;
2255 LONGEST base_offset;
2256 LONGEST this_offset;
2261 struct value *base_val;
2262 const gdb_byte *base_valaddr;
2272 gdb::byte_vector tmp (baseclass->
length ());
2276 tmp.data (), baseclass->
length ()) != 0)
2277 error (_(
"virtual baseclass botch"));
2302 if (v == (
struct value *) - 1)
2314 return (
struct value *) - 1;
2336 gdb::optional<gdb::array_view<value *>> args,
2337 const char *
name,
int *static_memfuncp,
const char *
err)
2357 if (t->
code () != TYPE_CODE_STRUCT
2358 && t->
code () != TYPE_CODE_UNION)
2359 error (_(
"Attempt to extract a component of a value that is not a %s."),
2363 if (static_memfuncp)
2364 *static_memfuncp = 0;
2366 if (!args.has_value ())
2388 static_memfuncp, t);
2390 if (v == (
struct value *) - 1)
2391 error (_(
"Cannot take address of method %s."),
name);
2395 error (_(
"There is no member or method named %s."),
name);
2397 error (_(
"There is no member named %s."),
name);
2403 static_memfuncp, t);
2405 if (v == (
struct value *) - 1)
2407 error (_(
"One of the arguments you tried to pass to %s could not "
2408 "be converted to what the function wants."),
name);
2418 if (v && static_memfuncp)
2419 *static_memfuncp = 1;
2423 throw_error (NOT_FOUND_ERROR,
2424 _(
"Structure has no component named %s."),
name);
2452 if (t->
code () != TYPE_CODE_STRUCT
2453 && t->
code () != TYPE_CODE_UNION)
2454 error (_(
"Attempt to extract a component of a value that is not a %s."),
2465 error (_(
"No field with matching bitpos and type."));
2496 gdb::array_view<fn_field> *methods,
2497 std::vector<xmethod_worker_up> *xmethods,
2498 struct type **basetype, LONGEST *boffset)
2503 gdb_assert (methods != NULL && xmethods != NULL);
2510 if (methods->empty ())
2517 if (fn_field_name && (
strcmp_iw (fn_field_name, method) == 0))
2521 *methods = gdb::make_array_view (
f, len);
2548 LONGEST base_offset;
2565 xmethods, basetype, boffset);
2588 gdb::array_view<fn_field> *methods,
2589 std::vector<xmethod_worker_up> *xmethods,
2590 struct type **basetype, LONGEST *boffset)
2606 if (t->
code () != TYPE_CODE_STRUCT
2607 && t->
code () != TYPE_CODE_UNION)
2608 error (_(
"Attempt to extract a component of a "
2609 "value that is not a struct or union"));
2611 gdb_assert (methods != NULL && xmethods != NULL);
2630 int incomplete_types = 0;
2631 std::string incomplete_arg_names;
2632 for (
const struct value *arg : args)
2635 while (t->
code () == TYPE_CODE_PTR)
2640 if (incomplete_types > 0)
2641 incomplete_arg_names +=
", ";
2647 incomplete_arg_names += buffer.
string ();
2651 if (incomplete_types > 1)
2652 hint = string_printf (_(
"\nThe types: '%s' aren't fully known to GDB."
2653 " Please cast them directly to the desired"
2654 " typed in the function call."),
2655 incomplete_arg_names.c_str ());
2656 else if (incomplete_types == 1)
2657 hint = string_printf (_(
"\nThe type: '%s' isn't fully known to GDB."
2658 " Please cast it directly to the desired"
2659 " typed in the function call."),
2660 incomplete_arg_names.c_str ());
2715 int *staticp,
const int no_adl,
2718 struct value *obj = (objp ? *objp : NULL);
2721 int func_oload_champ = -1;
2722 int method_oload_champ = -1;
2723 int src_method_oload_champ = -1;
2724 int ext_method_oload_champ = -1;
2732 struct value *temp = obj;
2734 gdb::array_view<fn_field> methods;
2736 std::vector<symbol *> functions;
2738 std::vector<xmethod_worker_up> xmethods;
2739 struct type *basetype = NULL;
2742 const char *obj_type_name = NULL;
2743 const char *func_name = NULL;
2744 gdb::unique_xmalloc_ptr<char> temp_func;
2777 &xmethods, &basetype, &boffset);
2780 if (method ==
METHOD && methods.empty () && xmethods.empty ())
2781 error (_(
"Couldn't find method %s%s%s"),
2783 (obj_type_name && *obj_type_name) ?
"::" :
"",
2788 if (!methods.empty ())
2792 src_method_oload_champ
2795 methods.data (), NULL, NULL,
2796 &src_method_badness);
2799 (src_method_badness, args.size (),
2803 if (!xmethods.empty ())
2805 ext_method_oload_champ
2808 NULL, xmethods.data (), NULL,
2809 &ext_method_badness);
2814 if (src_method_oload_champ >= 0 && ext_method_oload_champ >= 0)
2828 if (ext_method_match_quality !=
STANDARD)
2830 method_oload_champ = src_method_oload_champ;
2831 method_badness = src_method_badness;
2832 ext_method_oload_champ = -1;
2833 method_match_quality = src_method_match_quality;
2838 method_oload_champ = ext_method_oload_champ;
2839 method_badness = ext_method_badness;
2840 src_method_oload_champ = -1;
2841 method_match_quality = ext_method_match_quality;
2844 method_oload_champ = src_method_oload_champ;
2845 method_badness = src_method_badness;
2846 ext_method_oload_champ = -1;
2847 method_match_quality = src_method_match_quality;
2850 gdb_assert_not_reached (
"Unexpected overload comparison "
2855 else if (src_method_oload_champ >= 0)
2857 method_oload_champ = src_method_oload_champ;
2858 method_badness = src_method_badness;
2859 method_match_quality = src_method_match_quality;
2861 else if (ext_method_oload_champ >= 0)
2863 method_oload_champ = ext_method_oload_champ;
2864 method_badness = ext_method_badness;
2865 method_match_quality = ext_method_match_quality;
2871 const char *qualified_name = NULL;
2895 if (temp_func !=
nullptr)
2897 if (strcmp (temp_func.get (), qualified_name) == 0)
2900 func_name = temp_func.get ();
2907 qualified_name =
name;
2913 if (func_name == NULL)
2926 if (func_oload_champ >= 0)
2932 if (method_oload_champ == -1 && func_oload_champ == -1)
2933 throw_error (NOT_FOUND_ERROR,
2934 _(
"No symbol \"%s\" in current context."),
2940 if (method_oload_champ >= 0 && func_oload_champ >= 0)
2948 error (_(
"Ambiguous overload resolution"));
2953 error (_(
"Internal error: incompatible "
2954 "overload candidates proposed"));
2957 method_oload_champ = -1;
2958 match_quality = func_match_quality;
2961 func_oload_champ = -1;
2962 match_quality = method_match_quality;
2965 error (_(
"Internal error: unexpected overload comparison result"));
2972 if (method_oload_champ >= 0)
2973 match_quality = method_match_quality;
2975 match_quality = func_match_quality;
2982 error (_(
"Cannot resolve method %s%s%s to any overloaded instance%s"),
2984 (obj_type_name && *obj_type_name) ?
"::" :
"",
2985 name, hint.c_str ());
2987 error (_(
"Cannot resolve function %s to any overloaded instance%s"),
2988 func_name, hint.c_str ());
2993 warning (_(
"Using non-standard conversion to match "
2994 "method %s%s%s to supplied arguments"),
2996 (obj_type_name && *obj_type_name) ?
"::" :
"",
2999 warning (_(
"Using non-standard conversion to match "
3000 "function %s to supplied arguments"),
3004 if (staticp != NULL)
3007 if (method_oload_champ >= 0)
3009 if (src_method_oload_champ >= 0)
3015 method_oload_champ, basetype,
3020 method_oload_champ, basetype, boffset);
3024 (std::move (xmethods[ext_method_oload_champ]));
3027 *symp = functions[func_oload_champ];
3034 if (temp_type->
code () != TYPE_CODE_PTR
3042 switch (match_quality)
3061 const char *func_name,
3062 const char *qualified_name,
3063 std::vector<symbol *> *oload_syms,
3072 oload_syms, oload_champ_bv,
3087 const char *func_name,
3088 const char *qualified_name,
3090 std::vector<symbol *> *oload_syms,
3095 int next_namespace_len = namespace_len;
3096 int searched_deeper = 0;
3097 int new_oload_champ;
3098 char *new_namespace;
3100 if (next_namespace_len != 0)
3102 gdb_assert (qualified_name[next_namespace_len] ==
':');
3103 next_namespace_len += 2;
3105 next_namespace_len +=
3111 if (qualified_name[next_namespace_len] ==
':')
3113 searched_deeper = 1;
3116 func_name, qualified_name,
3118 oload_syms, oload_champ_bv,
3119 oload_champ, no_adl))
3133 new_namespace = (
char *) alloca (namespace_len + 1);
3134 strncpy (new_namespace, qualified_name, namespace_len);
3135 new_namespace[namespace_len] =
'\0';
3137 std::vector<symbol *> new_oload_syms
3142 if (!searched_deeper && !no_adl)
3145 struct type **arg_types;
3148 arg_types = (
struct type **)
3149 alloca (args.size () * (
sizeof (
struct type *)));
3150 for (ix = 0; ix < args.size (); ix++)
3158 new_oload_syms.size (),
3159 NULL, NULL, new_oload_syms.data (),
3160 &new_oload_champ_bv);
3169 if (new_oload_champ != -1
3172 *oload_syms = std::move (new_oload_syms);
3173 *oload_champ = new_oload_champ;
3174 *oload_champ_bv = std::move (new_oload_champ_bv);
3177 else if (searched_deeper)
3183 *oload_syms = std::move (new_oload_syms);
3184 *oload_champ = new_oload_champ;
3185 *oload_champ_bv = std::move (new_oload_champ_bv);
3212 int oload_champ = -1;
3214 int oload_ambiguous = 0;
3220 gdb_assert ((methods != NULL) + (functions != NULL) + (xmethods != NULL)
3224 for (
size_t ix = 0; ix < num_fns; ix++)
3227 int static_offset = 0;
3228 std::vector<type *> parm_types;
3230 if (xmethods != NULL)
3231 parm_types = xmethods[ix]->get_arg_types ();
3236 if (methods != NULL)
3244 parm_types.reserve (nparms);
3245 for (jj = 0; jj < nparms; jj++)
3247 type *t = (methods != NULL
3250 parm_types.push_back (t);
3257 args.slice (static_offset));
3261 if (methods != NULL)
3263 "Overloaded method instance %s, # of parms %d\n",
3264 methods[ix].physname, (
int) parm_types.size ());
3265 else if (xmethods != NULL)
3267 "Xmethod worker, # of parms %d\n",
3268 (
int) parm_types.size ());
3271 "Overloaded function instance "
3272 "%s # of parms %d\n",
3273 functions[ix]->demangled_name (),
3274 (
int) parm_types.size ());
3277 "...Badness of length : {%d, %d}\n",
3278 bv[0].
rank, bv[0].subrank);
3280 for (jj = 1; jj < bv.size (); jj++)
3282 "...Badness of arg %d : {%d, %d}\n",
3283 jj, bv[jj].
rank, bv[jj].subrank);
3286 if (oload_champ_bv->empty ())
3288 *oload_champ_bv = std::move (bv);
3296 oload_ambiguous = 1;
3299 oload_ambiguous = 2;
3302 *oload_champ_bv = std::move (bv);
3303 oload_ambiguous = 0;
3312 "champion is %d, ambiguous? %d\n",
3313 oload_champ, oload_ambiguous);
3341 for (ix = 1; ix <= nargs - static_offset; ix++)
3372 const char *cp = strchr (dname,
'<');
3377 len = strlen (dname);
3380 if (strlen (
name + 1) != len || strncmp (dname,
name + 1, len) != 0)
3381 error (_(
"name of destructor must equal name of class"));
3392static struct value *
3396 int name_len = strlen (
name);
3398 gdb_assert (
type->
code () == TYPE_CODE_ENUM
3412 len = strlen (fname);
3413 if (len + 2 >= name_len
3414 && fname[len - name_len - 2] ==
':'
3415 && fname[len - name_len - 1] ==
':'
3416 && strcmp (&fname[len - name_len],
name) == 0)
3420 error (_(
"no constant named \"%s\" in enum \"%s\""),
3432 struct type *expect_type,
int want_address,
3435 switch (curtype->
code ())
3437 case TYPE_CODE_STRUCT:
3438 case TYPE_CODE_UNION:
3442 case TYPE_CODE_NAMESPACE:
3446 case TYPE_CODE_ENUM:
3450 internal_error (_(
"non-aggregate type in value_aggregate_elt"));
3473 if (skip_artificial)
3475 while (start < t1->num_fields ()
3515 struct value *v,
int *boffs,
bool *isvirt)
3536 if (*isvirt ==
false)
3556static struct value *
3558 struct type *curtype,
const char *
name,
3559 struct type *intype,
3565 struct value *result;
3567 if (t->
code () != TYPE_CODE_STRUCT
3568 && t->
code () != TYPE_CODE_UNION)
3569 error (_(
"Internal error: non-aggregate type "
3570 "to value_struct_elt_for_reference"));
3574 const char *t_field_name = t->
field (i).
name ();
3576 if (t_field_name && strcmp (t_field_name,
name) == 0)
3586 error (_(
"pointers to bitfield members not allowed"));
3602 struct value *ptr, *this_v = v;
3608 gdb_assert (
type != NULL
3609 &&
type->
code () == TYPE_CODE_MEMBERPTR);
3613 if (domain != curtype)
3618 bool isvirt =
false;
3637 error (_(
"Cannot reference non-static field \"%s\""),
name);
3646 while (intype && intype->
code () == TYPE_CODE_PTR)
3653 if (t_field_name && strcmp (t_field_name,
name) == 0)
3663 for (j = 0; j < len; ++j)
3677 error (_(
"no member function matches "
3678 "that type instantiation"));
3685 for (ii = 0; ii < len; ++ii)
3703 error (_(
"non-unique member `%s' requires "
3704 "type instantiation"),
name);
3710 error (_(
"no matching member function"));
3741 error (_(
"Cannot reference virtual member function \"%s\""),
3796static struct value *
3798 const char *
name,
int want_address,
3806 error (_(
"No symbol \"%s\" in namespace \"%s\"."),
3818static struct value *
3820 const char *
name,
int want_address,
3825 struct value *result;
3851 LONGEST *top,
int *using_enc)
3853 struct value *target = NULL;
3860 else if (
type->
code () == TYPE_CODE_PTR)
3867 catch (
const gdb_exception_error &except)
3869 if (except.error == MEMORY_ERROR)
3892 else if (
type->
code () == TYPE_CODE_PTR)
3895 internal_error (_(
"Unexpected value type."));
3918 int xfull,
int xtop,
3921 struct type *real_type;
3925 struct value *new_val;
3932 using_enc = xusing_enc;
3961 warning (_(
"Couldn't retrieve complete object of RTTI "
3962 "type %s; object may be in register(s)."),
3963 real_type->
name ());
3989 const struct block *b;
3993 error (_(
"no `this' in current language"));
4001 error (_(
"current stack frame does not contain a variable named `%s'"),
4013 struct value *ret = NULL;
4019 catch (
const gdb_exception_error &except)
4033 struct type *slice_range_type, *slice_type, *range_type;
4034 LONGEST lowerbound, upperbound;
4035 struct value *slice;
4036 struct type *array_type;
4039 if (array_type->
code () != TYPE_CODE_ARRAY
4040 && array_type->
code () != TYPE_CODE_STRING)
4041 error (_(
"cannot take slice of non-array"));
4044 error (_(
"array not allocated"));
4046 error (_(
"array not associated"));
4050 error (_(
"slice from bad array or bitstring"));
4052 if (lowbound < lowerbound ||
length < 0
4053 || lowbound +
length - 1 > upperbound)
4054 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 *
4150 int len = val_real_type->
length ();
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 * 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
int field_is_static(struct field *f)
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)
struct type * create_array_type(struct type *result_type, struct type *element_type, struct type *range_type)
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)
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)
struct type * create_static_range_type(struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
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_FIELD_ARTIFICIAL(thistype, n)
#define TYPE_FN_FIELD_STATIC_P(thisfn, n)
#define TYPE_FIELD_PACKED(thistype, 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
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
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
const struct lval_funcs * funcs
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)
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(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_string(const char *ptr, ssize_t len, struct type *char_type)
struct value * value_array(int lowbound, int highbound, struct value **elemvec)
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)
struct value * value_cstring(const char *ptr, ssize_t len, struct type *char_type)
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_allocate_space_in_inferior(int len)
struct type * value_rtti_indirect_type(struct value *v, int *full, LONGEST *top, int *using_enc)
struct value * value_at_lazy(struct type *type, CORE_ADDR addr)
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 * 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)
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)
static struct value * get_value_at(struct type *type, CORE_ADDR addr, int lazy)
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_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)
void read_value_memory(struct value *val, LONGEST bit_offset, int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length)
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)
static std::string incomplete_type_hint(gdb::array_view< value * > args)
struct type * value_type(const struct value *value)
struct value * value_from_component(struct value *whole, struct type *type, LONGEST offset)
struct value * value_zero(struct type *type, enum lval_type lv)
LONGEST value_embedded_offset(const struct value *value)
struct value * value_of_internalvar(struct gdbarch *gdbarch, struct internalvar *var)
struct value * allocate_value_lazy(struct type *type)
LONGEST value_offset(const struct value *value)
gdb::array_view< const gdb_byte > value_contents_all(struct value *value)
LONGEST value_bitsize(const struct value *value)
struct value * value_parent(const struct value *value)
const struct lval_funcs * value_computed_funcs(const struct value *v)
bool is_floating_value(struct value *val)
int value_lazy(const struct value *value)
void value_contents_copy(struct value *dst, LONGEST dst_offset, struct value *src, LONGEST src_offset, LONGEST length)
struct value * allocate_value(struct type *type)
CORE_ADDR value_as_address(struct value *val)
struct gdbarch * get_value_arch(const struct value *value)
void set_value_embedded_offset(struct value *value, LONGEST val)
void set_value_address(struct value *value, CORE_ADDR addr)
void set_value_component_location(struct value *component, const struct value *whole)
void value_fetch_lazy(struct value *val)
struct value * value_primitive_field(struct value *arg1, LONGEST offset, int fieldno, struct type *arg_type)
void set_value_offset(struct value *value, LONGEST offset)
struct value * value_from_xmethod(xmethod_worker_up &&worker)
struct value * value_from_ulongest(struct type *type, ULONGEST num)
struct value * value_static_field(struct type *type, int fieldno)
CORE_ADDR value_address(const struct value *value)
struct value * value_from_longest(struct type *type, LONGEST num)
gdb::array_view< gdb_byte > value_contents_raw(struct value *value)
struct value * coerce_ref(struct value *arg)
struct value * coerce_array(struct value *arg)
void mark_value_bits_unavailable(struct value *value, LONGEST offset, LONGEST length)
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)
gdb::array_view< const gdb_byte > value_contents(struct value *value)
gdb::array_view< gdb_byte > value_contents_writeable(struct value *value)
gdb::array_view< gdb_byte > value_contents_all_raw(struct value *value)
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)
struct value * value_copy(const value *arg)
void set_value_pointed_to_offset(struct value *value, LONGEST val)
LONGEST value_pointed_to_offset(const struct value *value)
int value_stack(const struct value *value)
gdb::array_view< const gdb_byte > value_contents_for_printing(struct value *value)
void set_value_enclosing_type(struct value *val, struct type *new_encl_type)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
struct type * value_enclosing_type(const struct value *value)
int deprecated_value_modifiable(const struct value *value)
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)
void deprecated_set_value_type(struct value *value, struct type *type)
int value_bits_synthetic_pointer(const struct value *value, LONGEST offset, LONGEST length)
struct value * value_from_contents_and_address(struct type *type, const gdb_byte *valaddr, CORE_ADDR address)
LONGEST value_bitpos(const struct value *value)
void set_value_lazy(struct value *value, int val)
struct value * allocate_repeat_value(struct type *type, int count)
#define VALUE_NEXT_FRAME_ID(val)
#define VALUE_REGNUM(val)
#define VALUE_INTERNALVAR(val)