39#include "gdbsupport/gdb_obstack.h"
95 gdb::optional<enable_thread_stack_temporaries> stack_temporaries;
101 struct value *retval =
op->evaluate (expect_type,
this,
noside);
103 if (stack_temporaries.has_value ()
153 std::vector<value_ref_ptr> *val_chain,
154 bool preserve_errors)
156 struct value *mark, *new_mark, *result;
172 catch (
const gdb_exception &ex)
180 if (!preserve_errors)
190 if (mark == new_mark)
209 catch (
const gdb_exception_error &except)
265 struct type *promoted_type = NULL;
275 if ((type1->
code () != TYPE_CODE_FLT
276 && type1->
code () != TYPE_CODE_DECFLOAT
278 || (type2->
code () != TYPE_CODE_FLT
279 && type2->
code () != TYPE_CODE_DECFLOAT
286 if (type1->
code () == TYPE_CODE_DECFLOAT
287 || type2->
code () == TYPE_CODE_DECFLOAT)
291 else if (type1->
code () == TYPE_CODE_FLT
292 || type2->
code () == TYPE_CODE_FLT)
317 else if (type1->
code () == TYPE_CODE_BOOL
318 && type2->
code () == TYPE_CODE_BOOL)
327 unsigned int promoted_len1 = type1->
length ();
328 unsigned int promoted_len2 = type2->
length ();
331 unsigned int result_len;
332 int unsigned_operation;
347 if (promoted_len1 > promoted_len2)
349 unsigned_operation = is_unsigned1;
350 result_len = promoted_len1;
352 else if (promoted_len2 > promoted_len1)
354 unsigned_operation = is_unsigned2;
355 result_len = promoted_len2;
359 unsigned_operation = is_unsigned1 || is_unsigned2;
360 result_len = promoted_len1;
371 promoted_type = (unsigned_operation
377 promoted_type = (unsigned_operation
383 promoted_type = (unsigned_operation
411 if (unsigned_operation)
450 case TYPE_CODE_ARRAY:
468 int num_types,
struct type **param_types);
480 int num_types,
struct type **param_types)
491 if (param_types[num_types - 1] == NULL)
501 gdb_assert (num_types == 0);
512 ((
struct field *) xzalloc (
sizeof (
struct field) * num_types));
514 while (num_types-- > 0)
532 std::vector<type *> &types = std::get<1> (
m_storage);
535 return std::get<2> (
m_storage)->evaluate (fake_expect_type.
type (),
555 struct value *ret = NULL;
562 catch (
const gdb_exception_error &except)
583 if (var->
type ()->
code () == TYPE_CODE_ERROR)
610 gdb::array_view<value *> argvec,
611 const char *function_name,
612 type *default_return_type)
615 error (_(
"Cannot evaluate function -- may be inlined"));
624 if (ftype->
code () == TYPE_CODE_INTERNAL_FUNCTION)
632 else if (ftype->
code () == TYPE_CODE_XMETHOD)
636 if (return_type == NULL)
637 error (_(
"Xmethod is missing return type."));
640 else if (ftype->
code () == TYPE_CODE_FUNC
641 || ftype->
code () == TYPE_CODE_METHOD)
648 if (resolved_type != NULL)
649 ftype = resolved_type;
654 if (return_type == NULL)
655 return_type = default_return_type;
657 if (return_type == NULL)
663 error (_(
"Expression of type other than "
664 "\"Function returning ...\" used as function"));
668 case TYPE_CODE_INTERNAL_FUNCTION:
670 callee, argvec.size (), argvec.data ());
671 case TYPE_CODE_XMETHOD:
685 const char *function_name,
686 const std::vector<operation_up> &args)
688 std::vector<value *> vals (args.size ());
694 for (
int i = 0; i < args.size (); ++i)
696 if (i < type->num_fields ())
699 vals[i] = args[i]->evaluate_with_coercion (exp,
noside);
703 function_name, expect_type);
710 const std::vector<operation_up> &args)
716 std::vector<value *> argvec (args.size ());
717 for (
int i = 0; i < args.size (); ++i)
723 NULL, &symp, NULL, 0,
noside);
725 if (symp->
type ()->
code () == TYPE_CODE_ERROR)
731 nullptr, expect_type);
738 const std::vector<operation_up> &args)
750 const char *function_name = NULL;
751 std::vector<value *> argvec (1 + args.size ());
752 if (
type->
code () == TYPE_CODE_NAMESPACE)
758 if (function == NULL)
759 error (_(
"No symbol \"%s\" in namespace \"%s\"."),
764 gdb_assert (
type->
code () == TYPE_CODE_STRUCT
765 ||
type->
code () == TYPE_CODE_UNION);
766 function_name =
name.c_str ();
772 for (
int i = 0; i < args.size (); ++i)
774 gdb::array_view<value *> arg_view = argvec;
776 value *callee =
nullptr;
777 if (function_name !=
nullptr)
782 &argvec[0],
nullptr, &callee,
nullptr,
783 &static_memfuncp, 0,
noside);
784 if (!static_memfuncp)
787 error (_(
"Call to overloaded function %s requires "
792 arg_view = arg_view.slice (1);
797 arg_view = arg_view.slice (1);
800 nullptr, &symp,
nullptr, 1,
noside);
805 nullptr, expect_type);
812 const std::vector<operation_up> &args)
816 if (
opcode () == STRUCTOP_MEMBER)
821 std::vector<value *> vals (args.size () + 1);
822 gdb::array_view<value *> val_view = vals;
831 if (a1_type->
code () == TYPE_CODE_METHODPTR)
840 else if (a1_type->
code () == TYPE_CODE_MEMBERPTR)
842 struct type *type_ptr
844 struct type *target_type_ptr
856 val_view = val_view.slice (1);
859 error (_(
"Non-pointer-to-member value used in pointer-to-member "
862 for (
int i = 0; i < args.size (); ++i)
866 nullptr, expect_type);
873 const std::vector<operation_up> &args)
877 std::vector<value *> vals (args.size () + 1);
880 if (op == STRUCTOP_STRUCT)
911 catch (
const gdb_exception_error &except)
913 if (except.error == NOT_FOUND_ERROR)
925 for (
int i = 0; i < args.size (); ++i)
929 gdb::array_view<value *> arg_view (vals);
933 const char *tstr = std::get<1> (
m_storage).c_str ();
939 value *val0 = vals[0];
941 &val0,
nullptr, &callee,
nullptr,
942 &static_memfuncp, 0,
noside);
948 struct value *temp = vals[0];
952 op == STRUCTOP_STRUCT
953 ?
"structure" :
"structure pointer");
964 arg_view = arg_view.slice (1);
967 nullptr, expect_type);
976 const char *fieldname,
int namelen,
const char *
prefix)
979 int computed_type_name = 0;
980 const char *type_name = NULL;
987 output, fieldname, namelen,
prefix);
1001 output, fieldname, namelen,
prefix);
1010 if (
name && ! strncmp (
name, fieldname, namelen))
1012 if (!computed_type_name)
1015 computed_type_name = 1;
1018 if (!type_name || strcmp (type_name,
name))
1019 output.emplace_back (concat (
prefix,
name,
nullptr));
1031 const std::string &fieldname = std::get<1> (
m_storage);
1044 if (
type->
code () == TYPE_CODE_UNION
1045 ||
type->
code () == TYPE_CODE_STRUCT)
1069 return (
type !=
nullptr
1079 struct type *
type,
const char *
string)
1084 error (_(
"There is no field named %s"),
string);
1099 error (_(
"Symbol \"%s\" does not have any specific entry value"),
1117 if (
type->
code () == TYPE_CODE_ERROR
1134 error (_(
"No symbol \"%s\" in specified context."), var);
1150 error (_(
"Register $%s not available."),
name);
1163 error (_(
"Value of register %s not available."),
name);
1176 const std::string &str = std::get<0> (
m_storage);
1205 return value_slice (array, lowbound, upperbound - lowbound + 1);
1213 struct value *arg1,
const char *
string)
1227 struct value *arg1,
const char *
string)
1239 catch (
const gdb_exception_error &except)
1241 if (except.error == NOT_FOUND_ERROR)
1255 struct type *real_type;
1256 int full, using_enc;
1272 NULL,
"structure pointer");
1291 case TYPE_CODE_METHODPTR:
1301 case TYPE_CODE_MEMBERPTR:
1313 error (_(
"non-pointer-to-member value used "
1314 "in pointer-to-member construct"));
1385 || op == BINOP_INTDIV
1390 struct value *v_one;
1400 if ((op == BINOP_LSH || op == BINOP_RSH || op == BINOP_EXP)
1428 if (
type->
code () != TYPE_CODE_ARRAY
1432 error (_(
"cannot subscript something of type `%s'"),
1435 error (_(
"cannot subscript requested type"));
1580 &&
type->
code () != TYPE_CODE_ENUM)
1581 error (_(
"Non-integral right operand for \"@\" operator."));
1664 if (
type->
code () == TYPE_CODE_METHODPTR
1665 ||
type->
code () == TYPE_CODE_MEMBERPTR)
1666 error (_(
"Attempt to dereference pointer "
1667 "to member without an object"));
1684 ||
type->
code () == TYPE_CODE_ARRAY)
1687 else if (
type->
code () == TYPE_CODE_INT)
1692 error (_(
"Attempt to take contents of a non-pointer value."));
1700 if (
type->
code () == TYPE_CODE_INT)
1718 error (_(
"could not determine alignment of type"));
1755 struct value *tmp = arg1;
1786 struct value *tmp = arg1;
1819 struct value *tmp = arg1;
1853 struct value *tmp = arg1;
1874 error (_(
"Attempt to use a type name as an expression"));
1898 struct value *tmp = arg1;
1902 if ((op == BINOP_LSH || op == BINOP_RSH || op == BINOP_EXP)
1915static struct value *
1918 value *target, gdb::array_view<value *> args)
1920 CORE_ADDR responds_selector = 0;
1921 CORE_ADDR method_selector = 0;
1925 struct value *msg_send = NULL;
1926 struct value *msg_send_stret = NULL;
1927 int gnu_runtime = 0;
1929 struct value *method = NULL;
1930 struct value *called_method = NULL;
1932 struct type *selector_type = NULL;
1933 struct type *long_type;
1936 struct value *ret = NULL;
1960 type = selector_type;
1990 if (responds_selector == 0)
1994 if (responds_selector == 0)
1995 error (_(
"no 'respondsTo:' or 'respondsToSelector:' method"));
1999 if (method_selector == 0)
2003 if (method_selector == 0)
2004 error (_(
"no 'methodFor:' or 'methodForSelector:' method"));
2009 argvec[0] = msg_send;
2023 error (_(
"Target does not respond to this message selector."));
2031 argvec[0] = msg_send;
2049 struct symbol *sym = NULL;
2068 struct type *val_type;
2076 if ((val_type == NULL)
2077 || (val_type->
code () == TYPE_CODE_ERROR))
2079 if (expect_type != NULL)
2080 val_type = expect_type;
2086 else if (expect_type != NULL)
2108 error (_(
"method address has symbol information "
2109 "with non-function type; skipping"));
2129 called_method = msg_send_stret;
2131 called_method = msg_send;
2147 if (callee_type && callee_type->
code () == TYPE_CODE_PTR)
2153 if ((callee_type->
code () == TYPE_CODE_ERROR) && expect_type)
2159 error (_(
"Expression of type other than "
2160 "\"method returning ...\" used as a method"));
2170 if (gnu_runtime && (method != NULL))
2184static struct value *
2187 gdb::array_view<value *> args)
2189 for (
value *arg2 : args)
2203 case TYPE_CODE_ARRAY:
2204 case TYPE_CODE_STRING:
2210 error (_(
"cannot subscript something of type `%s'"),
2213 error (_(
"cannot subscript requested type"));
2236 = std::get<1> (
m_storage)->evaluate (selector_type, exp, sub_no_side);
2242 std::vector<operation_up> &args = std::get<2> (
m_storage);
2243 value **argvec = XALLOCAVEC (
struct value *, args.size () + 3);
2244 argvec[0] =
nullptr;
2245 argvec[1] =
nullptr;
2246 for (
int i = 0; i < args.size (); ++i)
2248 argvec[args.size () + 2] =
nullptr;
2252 gdb::make_array_view (argvec,
2262 std::vector<operation_up> &values = std::get<1> (
m_storage);
2263 value **argvec = XALLOCAVEC (
struct value *, values.size ());
2264 for (
int ix = 0; ix < values.size (); ++ix)
2267 gdb::make_array_view (argvec, values.size ()));
2334 std::vector<operation_up> &arg_ops = std::get<2> (
m_storage);
2335 std::vector<value *> args (arg_ops.size ());
2336 for (
int i = 0; i < arg_ops.size (); ++i)
2343 nullptr, &symp,
nullptr, 0,
noside);
2344 if (symp->
type ()->
code () == TYPE_CODE_ERROR)
2348 nullptr, expect_type);
2360 const std::vector<operation_up> &in_args = std::get<2> (
m_storage);
2362 struct type *field_type;
2366 while (--nargs >= 0)
2368 struct value *val = NULL;
2369 int bitpos, bitsize;
2374 while (fieldno < struct_type->num_fields ()
2378 error (_(
"too many initializers"));
2379 field_type = struct_type->
field (fieldno).
type ();
2380 if (field_type->
code () == TYPE_CODE_UNION
2381 && struct_type->
field (fieldno).
name ()[0] ==
'0')
2382 error (_(
"don't know which variant you want to set"));
2393 field_type = struct_type->
field (fieldno).
type ();
2395 val = in_args[idx++]->evaluate (field_type, exp,
noside);
2425 const std::vector<operation_up> &in_args = std::get<2> (
m_storage);
2426 int nargs = tem3 - tem2 + 1;
2429 if (expect_type !=
nullptr
2430 &&
type->
code () == TYPE_CODE_STRUCT)
2438 if (expect_type !=
nullptr
2439 &&
type->
code () == TYPE_CODE_ARRAY)
2445 LONGEST low_bound, high_bound, index;
2450 high_bound = (
type->
length () / element_size) - 1;
2454 for (tem = nargs; --nargs >= 0;)
2456 struct value *element;
2458 element = in_args[index - low_bound]->evaluate (element_type,
2461 element =
value_cast (element_type, element);
2462 if (index > high_bound)
2464 error (_(
"Too many array elements"));
2466 + (index - low_bound) * element_size,
2474 if (expect_type !=
nullptr
2480 struct type *check_type = element_type;
2481 LONGEST low_bound, high_bound;
2484 while (check_type->
code () == TYPE_CODE_RANGE
2485 || check_type->
code () == TYPE_CODE_TYPEDEF)
2489 error (_(
"(power)set type with unknown size"));
2492 for (tem = 0; tem < nargs; tem++)
2494 LONGEST range_low, range_high;
2495 struct type *range_low_type, *range_high_type;
2496 struct value *elem_val;
2498 elem_val = in_args[idx++]->evaluate (element_type, exp,
noside);
2499 range_low_type = range_high_type =
value_type (elem_val);
2505 if (range_low_type->
code () == TYPE_CODE_RANGE)
2507 if (range_high_type->
code () == TYPE_CODE_RANGE)
2508 range_high_type = range_high_type->
target_type ();
2509 if ((range_low_type->
code () != range_high_type->
code ())
2510 || (range_low_type->
code () == TYPE_CODE_ENUM
2511 && (range_low_type != range_high_type)))
2513 error (_(
"POWERSET tuple elements of different mode"));
2514 if ((check_type->
code () != range_low_type->
code ())
2515 || (check_type->
code () == TYPE_CODE_ENUM
2516 && range_low_type != check_type))
2517 error (_(
"incompatible POWERSET tuple elements"));
2518 if (range_low > range_high)
2520 warning (_(
"empty POWERSET tuple range"));
2523 if (range_low < low_bound || range_high > high_bound)
2524 error (_(
"POWERSET tuple element out of range"));
2525 range_low -= low_bound;
2526 range_high -= low_bound;
2527 for (; range_low <= range_high; range_low++)
2529 int bit_index = (unsigned) range_low % TARGET_CHAR_BIT;
2532 bit_index = TARGET_CHAR_BIT - 1 - bit_index;
2533 valaddr[(unsigned) range_low / TARGET_CHAR_BIT]
2540 value **argvec = XALLOCAVEC (
struct value *, nargs);
2541 for (tem = 0; tem < nargs; tem++)
2545 argvec[tem] = in_args[tem]->evaluate_with_coercion (exp,
noside);
2559 error (_(
"length type is larger than the value type"));
2586 error (_(
"Attempt to take address of "
2587 "value not located in memory."));
2619 error (_(
"There is no field named %s"), std::get<1> (
m_storage).c_str ());
2666 value *typeval = std::get<0> (
m_storage)->evaluate (
nullptr, exp,
2692 error (_(
"Attempt to take address of register or constant."));
2706 if (
type->
code () == TYPE_CODE_ARRAY
2755 if (
type->
code () == TYPE_CODE_ERROR)
2772 if (
type->
code () == TYPE_CODE_ARRAY)
2775 if (
type->
code () == TYPE_CODE_ARRAY)
2784 struct type *size_type
2787 (size_type, (LONGEST)
value_type (val)->length ());
2804 &&
type->
code () != TYPE_CODE_ARRAY)
2805 error (_(
"Attempt to take contents of a non-pointer value."));
2825 value *typeval = std::get<0> (
m_storage)->evaluate (
nullptr, exp,
2839 if (
type->
code () == TYPE_CODE_ARRAY)
2904 char *tmp = (
char *) alloca (
length + 4);
2907 memcpy (tmp + 1, p,
length);
2915 error (_(
"Internal error in eval_type."));
const struct block * block_for_pc(CORE_ADDR pc)
struct symbol * find_pc_function(CORE_ADDR pc)
struct type * find_gnu_ifunc_target_type(CORE_ADDR resolver_funaddr)
void add_completions(completion_list &&list)
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
struct value * evaluate_struct_tuple(struct value *struct_val, struct expression *exp, enum noside noside, int nargs)
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
virtual value * evaluate_for_address(struct expression *exp, enum noside noside)
virtual value * evaluate_funcall(struct type *expect_type, struct expression *exp, enum noside noside, const std::vector< operation_up > &args)
virtual value * evaluate_with_coercion(struct expression *exp, enum noside noside)
virtual value * evaluate_for_sizeof(struct expression *exp, enum noside noside)
virtual value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside)=0
virtual enum exp_opcode opcode() const =0
virtual value * evaluate_for_cast(struct type *expect_type, struct expression *exp, enum noside noside)
value * evaluate_for_address(struct expression *exp, enum noside noside) override
value * evaluate_funcall(struct type *expect_type, struct expression *exp, enum noside noside, const std::vector< operation_up > &args) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate_funcall(struct type *expect_type, struct expression *exp, enum noside noside, const std::vector< operation_up > &args) override
virtual bool complete(struct expression *exp, completion_tracker &tracker)
value * evaluate_funcall(struct type *expect_type, struct expression *exp, enum noside noside, const std::vector< operation_up > &args) override
value * evaluate_for_sizeof(struct expression *exp, enum noside noside) override
std::tuple< Arg... > m_storage
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
struct type * get_type() const
value * evaluate_for_sizeof(struct expression *exp, enum noside noside) override
value * evaluate_for_address(struct expression *exp, enum noside noside) override
value * evaluate_for_sizeof(struct expression *exp, enum noside noside) override
value * evaluate_for_address(struct expression *exp, enum noside noside) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate_for_sizeof(struct expression *exp, enum noside noside) override
value * evaluate_for_address(struct expression *exp, enum noside noside) override
value * evaluate_for_sizeof(struct expression *exp, enum noside noside) override
value * evaluate_for_address(struct expression *exp, enum noside noside) override
value * evaluate_for_cast(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate_funcall(struct type *expect_type, struct expression *exp, enum noside noside, const std::vector< operation_up > &args) override
value * evaluate_for_cast(struct type *expect_type, struct expression *exp, enum noside noside) override
value * evaluate_for_sizeof(struct expression *exp, enum noside noside) override
value * evaluate_with_coercion(struct expression *exp, enum noside noside) override
value * evaluate_for_address(struct expression *exp, enum noside noside) override
value * evaluate(struct type *expect_type, struct expression *exp, enum noside noside) override
fake_method(type_instance_flags flags, int num_types, struct type **param_types)
std::vector< gdb::unique_xmalloc_ptr< char > > completion_list
struct value * cplus_method_ptr_to_value(struct value **this_p, struct value *method_ptr)
struct block_symbol cp_lookup_symbol_namespace(const char *scope, const char *name, const struct block *block, const domain_enum domain)
int longest_to_int(LONGEST)
struct value * eval_op_var_msym_value(struct type *expect_type, struct expression *exp, enum noside noside, bool outermost_p, bound_minimal_symbol msymbol)
value * evaluate_var_value(enum noside noside, const block *blk, symbol *var)
struct value * eval_op_memval(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, struct type *type)
struct value * eval_op_func_static_var(struct type *expect_type, struct expression *exp, enum noside noside, value *func, const char *var)
struct value * eval_op_objc_selector(struct type *expect_type, struct expression *exp, enum noside noside, const char *sel)
static value * evaluate_subexp_for_sizeof_base(struct expression *exp, struct type *type)
struct value * eval_op_var_entry_value(struct type *expect_type, struct expression *exp, enum noside noside, symbol *sym)
struct value * eval_op_geq(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
struct value * eval_op_preinc(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
struct value * eval_op_postdec(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
static bool is_integral_or_integral_reference(struct type *type)
struct value * eval_op_less(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
struct value * eval_op_lognot(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
value * evaluate_subexp_do_call(expression *exp, enum noside noside, value *callee, gdb::array_view< value * > argvec, const char *function_name, type *default_return_type)
static value * evaluate_subexp_for_address_base(struct expression *exp, enum noside noside, value *x)
struct value * eval_op_gtr(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
struct value * eval_op_neg(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
struct value * eval_op_notequal(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
value * evaluate_var_msym_value(enum noside noside, struct objfile *objfile, minimal_symbol *msymbol)
struct value * eval_op_structop_ptr(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, const char *string)
struct value * parse_to_comma_and_eval(const char **expp)
struct value * eval_op_alignof(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1)
struct value * eval_op_register(struct type *expect_type, struct expression *exp, enum noside noside, const char *name)
struct value * eval_op_binary(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
void binop_promote(const struct language_defn *language, struct gdbarch *gdbarch, struct value **arg1, struct value **arg2)
struct value * evaluate_expression(struct expression *exp, struct type *expect_type)
struct value * eval_op_complement(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
struct value * eval_op_scope(struct type *expect_type, struct expression *exp, enum noside noside, struct type *type, const char *string)
struct value * evaluate_type(struct expression *exp)
struct value * eval_op_add(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, struct value *arg2)
LONGEST parse_and_eval_long(const char *exp)
struct value * eval_op_ind(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1)
static struct value * eval_multi_subscript(struct type *expect_type, struct expression *exp, enum noside noside, value *arg1, gdb::array_view< value * > args)
struct value * eval_op_ternop(struct type *expect_type, struct expression *exp, enum noside noside, struct value *array, struct value *low, struct value *upper)
void unop_promote(const struct language_defn *language, struct gdbarch *gdbarch, struct value **arg1)
static int ptrmath_type_p(const struct language_defn *lang, struct type *type)
struct value * eval_op_equal(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
struct value * eval_op_structop_struct(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, const char *string)
struct type * parse_and_eval_type(const char *p, int length)
struct value * eval_op_plus(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
struct value * eval_op_postinc(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
struct value * eval_op_member(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, struct value *arg2)
void fetch_subexp_value(struct expression *exp, expr::operation *op, struct value **valp, struct value **resultp, std::vector< value_ref_ptr > *val_chain, bool preserve_errors)
struct value * eval_op_leq(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
CORE_ADDR parse_and_eval_address(const char *exp)
struct value * eval_op_predec(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1)
struct value * parse_and_eval(const char *exp)
struct value * eval_op_subscript(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
struct value * eval_op_sub(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, struct value *arg2)
struct value * eval_binop_assign_modify(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
struct value * eval_op_type(struct type *expect_type, struct expression *exp, enum noside noside, struct type *type)
struct value * eval_op_repeat(struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
static struct value * eval_op_objc_msgcall(struct type *expect_type, struct expression *exp, enum noside noside, CORE_ADDR selector, value *target, gdb::array_view< value * > args)
std::unique_ptr< expression > expression_up
expression_up parse_exp_1(const char **, CORE_ADDR pc, const struct block *, int, innermost_block_tracker *=nullptr)
@ EVAL_AVOID_SIDE_EFFECTS
expression_up parse_expression(const char *, innermost_block_tracker *=nullptr, bool void_context_p=false)
struct value * value_of_register(int regnum, frame_info_ptr frame)
frame_info_ptr get_selected_frame(const char *message)
const struct block * get_selected_block(CORE_ADDR *addr_in_block)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
int gdbarch_long_bit(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
int gdbarch_double_bit(struct gdbarch *gdbarch)
static int gdbarch_num_cooked_regs(gdbarch *arch)
bool value_in_thread_stack_temporaries(struct value *, struct thread_info *thr)
struct thread_info * inferior_thread(void)
bool thread_stack_temporaries_enabled_p(struct thread_info *tp)
struct type * lookup_pointer_type(struct type *type)
int is_integral_type(struct type *t)
int field_is_static(struct field *f)
int is_dynamic_type(struct type *type)
bool get_discrete_bounds(struct type *type, LONGEST *lowp, LONGEST *highp)
struct type * lookup_function_type(struct type *type)
struct type * lookup_unsigned_typename(const struct language_defn *language, const char *name)
int type_not_associated(const struct type *type)
unsigned type_align(struct type *type)
struct type * lookup_signed_typename(const struct language_defn *language, const char *name)
bool is_fixed_point_type(struct type *type)
int type_not_allocated(const struct type *type)
struct type * check_typedef(struct type *type)
#define TYPE_NFN_FIELDS(thistype)
#define TYPE_CHAIN(thistype)
#define TYPE_IS_REFERENCE(t)
#define TYPE_MAIN_TYPE(thistype)
#define TYPE_SELF_TYPE(thistype)
#define TYPE_BASECLASS(thistype, index)
#define TYPE_FIELD_BITSIZE(thistype, n)
#define TYPE_FN_FIELDLIST_NAME(thistype, n)
#define TYPE_N_BASECLASSES(thistype)
mach_port_t kern_return_t mach_port_t mach_msg_type_name_t msgportsPoly mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type, struct type **function_type)
void error_call_unknown_return_type(const char *func_name)
struct value * call_function_by_hand(struct value *function, type *default_return_type, gdb::array_view< value * > args)
struct inferior * current_inferior(void)
struct type * language_bool_type(const struct language_defn *la, struct gdbarch *gdbarch)
struct type * language_string_char_type(const struct language_defn *la, struct gdbarch *gdbarch)
#define CAST_IS_CONVERSION(LANG)
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
type * find_minsym_type_and_address(minimal_symbol *msymbol, objfile *objf, CORE_ADDR *address_p)
static void add_struct_fields(struct type *type, completion_list &output, const char *fieldname, int namelen, const char *prefix)
CORE_ADDR lookup_child_selector(struct gdbarch *gdbarch, const char *selname)
#define prefix(a, b, R, do)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
void(* func)(remote_target *remote, char *)
const struct block * block
struct minimal_symbol * minsym
struct type * builtin_long_long
struct type * builtin_double
struct type * builtin_long
struct type * builtin_data_ptr
struct type * builtin_long_double
struct type * builtin_unsigned_long_long
struct type * builtin_int
struct type * builtin_unsigned_int
struct type * builtin_unsigned_long
dynamic_prop_kind kind() const
const struct language_defn * language_defn
struct value * evaluate(struct type *expect_type, enum noside noside)
void set_type(struct type *type)
LONGEST loc_bitpos() const
const char * name() const
struct type * type() const
const char * print_name() const
enum language la_language
virtual bool c_style_arrays_p() const
unsigned int flag_bound_evaluated
address_class aclass() const
struct type * type() const
struct type * target_type() const
void set_is_prototyped(bool is_prototyped)
void set_code(type_code code)
struct field & field(int idx) const
void set_instance_flags(type_instance_flags flags)
void set_has_varargs(bool has_varargs)
bool is_gnu_ifunc() const
void set_num_fields(int num_fields)
void set_length(ULONGEST length)
bool is_pointer_or_reference() const
range_bounds * bounds() const
const char * name() const
type * index_type() const
void set_fields(struct field *fields)
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)
#define SYMBOL_COMPUTED_OPS(symbol)
bool target_has_execution(inferior *inf)
void error_unknown_type(const char *sym_print_name)
int user_reg_map_name_to_regnum(struct gdbarch *gdbarch, const char *name, int len)
bool value_logical_not(struct value *arg1)
struct value * value_subscript(struct value *array, LONGEST index)
struct value * value_x_binop(struct value *arg1, struct value *arg2, enum exp_opcode op, enum exp_opcode otherop, enum noside noside)
struct value * value_neg(struct value *arg1)
struct value * value_x_unop(struct value *arg1, enum exp_opcode op, enum noside noside)
struct value * value_complement(struct value *arg1)
struct value * value_pos(struct value *arg1)
int binop_user_defined_p(enum exp_opcode op, struct value *arg1, struct value *arg2)
int value_equal(struct value *arg1, struct value *arg2)
int value_less(struct value *arg1, struct value *arg2)
struct value * value_ptradd(struct value *arg1, LONGEST arg2)
LONGEST value_ptrdiff(struct value *arg1, struct value *arg2)
struct value * value_binop(struct value *arg1, struct value *arg2, enum exp_opcode op)
int unop_user_defined_p(enum exp_opcode op, struct value *arg1)
struct value * value_cast_pointers(struct type *type, struct value *arg2, int subclass_check)
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)
struct value * value_aggregate_elt(struct type *curtype, const char *name, struct type *expect_type, int want_address, enum noside noside)
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)
struct value * value_one(struct type *type)
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)
struct value * value_repeat(struct value *arg1, int count)
struct value * find_function_in_inferior(const char *name, struct objfile **objf_p)
struct value * value_cast(struct type *type, struct value *arg2)
struct value * value_assign(struct value *toval, struct value *fromval)
bool value_must_coerce_to_target(struct value *val)
struct value * value_ind(struct value *arg1)
struct value * address_of_variable(struct symbol *var, const struct block *b)
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)
void get_user_print_options(struct value_print_options *opts)
struct value * call_internal_function(struct gdbarch *gdbarch, const struct language_defn *language, struct value *func, int argc, struct value **argv)
struct type * value_type(const struct value *value)
struct value * value_zero(struct type *type, enum lval_type lv)
LONGEST value_embedded_offset(const struct value *value)
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)
void value_fetch_lazy(struct value *val)
struct value * allocate_optimized_out_value(struct type *type)
CORE_ADDR value_address(const struct value *value)
struct value * value_from_longest(struct type *type, LONGEST num)
struct value * value_non_lval(struct value *arg)
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)
gdb::array_view< const gdb_byte > value_contents(struct value *value)
gdb::array_view< gdb_byte > value_contents_writeable(struct value *value)
struct type * result_type_of_xmethod(struct value *method, gdb::array_view< value * > argv)
LONGEST value_as_long(struct value *val)
void modify_field(struct type *type, gdb_byte *addr, LONGEST fieldval, LONGEST bitpos, LONGEST bitsize)
std::vector< value_ref_ptr > value_release_to_mark(const struct value *mark)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
struct value * value_mark(void)
void deprecated_set_value_type(struct value *value, struct type *type)
int using_struct_return(struct gdbarch *gdbarch, struct value *function, struct type *value_type)
struct value * allocate_repeat_value(struct type *type, int count)
struct value * call_xmethod(struct value *method, gdb::array_view< value * > argv)