/* Definitions for values of C expressions, for GDB.
- Copyright (C) 1986-2020 Free Software Foundation, Inc.
+ Copyright (C) 1986-2021 Free Software Foundation, Inc.
This file is part of GDB.
#include "frame.h" /* For struct frame_id. */
#include "extension.h"
#include "gdbsupport/gdb_ref_ptr.h"
+#include "gmp-utils.h"
struct block;
struct expression;
extern void value_contents_copy (struct value *dst, LONGEST dst_offset,
struct value *src, LONGEST src_offset,
LONGEST length);
-extern void value_contents_copy_raw (struct value *dst, LONGEST dst_offset,
- struct value *src, LONGEST src_offset,
- LONGEST length);
extern struct value *allocate_repeat_value (struct type *type, int count);
extern struct value *value_complement (struct value *arg1);
extern struct value *value_struct_elt (struct value **argp,
- struct value **args,
+ gdb::optional<gdb::array_view <value *>> args,
const char *name, int *static_memfuncp,
const char *err);
extern struct value *evaluate_type (struct expression *exp);
-extern struct value *evaluate_subexp (struct type *expect_type,
- struct expression *exp,
- int *pos, enum noside noside);
-
-extern struct value *evaluate_subexpression_type (struct expression *exp,
- int subexp);
-
extern value *evaluate_var_value (enum noside noside, const block *blk,
symbol *var);
struct objfile *objfile,
minimal_symbol *msymbol);
-extern value *eval_skip_value (expression *exp);
-
-extern void fetch_subexp_value (struct expression *exp, int *pc,
+namespace expr { class operation; };
+extern 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);
-extern const char *extract_field_op (struct expression *exp, int *subexp);
-
-extern struct value *evaluate_subexp_with_coercion (struct expression *,
- int *, enum noside);
-
extern struct value *parse_and_eval (const char *exp);
extern struct value *parse_to_comma_and_eval (const char **expp);
exiting (e.g., on quit_force). */
extern void finalize_values ();
+/* Convert VALUE to a gdb_mpq. The caller must ensure that VALUE is
+ of floating-point, fixed-point, or integer type. */
+extern gdb_mpq value_to_gdb_mpq (struct value *value);
+
#endif /* !defined (VALUE_H) */