and closure CLOSURE. */
extern struct value *allocate_computed_value (struct type *type,
- struct lval_funcs *funcs,
- void *closure);
+ const struct lval_funcs *funcs,
+ void *closure);
+
+extern struct value *allocate_optimized_out_value (struct type *type);
/* If VALUE is lval_computed, return its lval_funcs structure. */
-extern struct lval_funcs *value_computed_funcs (struct value *value);
+extern const struct lval_funcs *value_computed_funcs (struct value *value);
/* If VALUE is lval_computed, return its closure. The meaning of the
returned value depends on the functions VALUE uses. */
extern int value_bytes_available (const struct value *value,
int offset, int length);
+/* Like value_bytes_available, but return false if any byte in the
+ whole object is unavailable. */
+extern int value_entirely_available (struct value *value);
+
/* Mark VALUE's content bytes starting at OFFSET and extending for
LENGTH bytes as unavailable. */
int offset, int length);
/* Compare LENGTH bytes of VAL1's contents starting at OFFSET1 with
- LENGTH bytes of VAL2's contents starting at OFFSET2. Returns true
- iff the set of available contents match. Unavailable contents
- compare equal with unavailable contents, and different with any
- available byte. For example, if 'x's represent an unavailable
- byte, and 'V' and 'Z' represent different available bytes, in a
- value with length 16:
+ LENGTH bytes of VAL2's contents starting at OFFSET2.
+
+ Note that "contents" refers to the whole value's contents
+ (value_contents_all), without any embedded offset adjustment. For
+ example, to compare a complete object value with itself, including
+ its enclosing type chunk, you'd do:
+
+ int len = TYPE_LENGTH (check_typedef (value_enclosing_type (val)));
+ value_available_contents (val, 0, val, 0, len);
+
+ Returns true iff the set of available contents match. Unavailable
+ contents compare equal with unavailable contents, and different
+ with any available byte. For example, if 'x's represent an
+ unavailable byte, and 'V' and 'Z' represent different available
+ bytes, in a value with length 16:
offset: 0 4 8 12 16
contents: xxxxVVVVxxxxVVZZ
memory is likewise unavailable. STACK indicates whether the memory
is known to be stack memory. */
-extern void read_value_memory (struct value *val, int offset,
+extern void read_value_memory (struct value *val, int embedded_offset,
int stack, CORE_ADDR memaddr,
gdb_byte *buffer, size_t length);
extern struct value *value_from_double (struct type *type, DOUBLEST num);
extern struct value *value_from_decfloat (struct type *type,
const gdb_byte *decbytes);
+extern struct value *value_from_history_ref (char *, char **);
extern struct value *value_at (struct type *type, CORE_ADDR addr);
extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr);
extern struct value *value_from_contents_and_address (struct type *,
const gdb_byte *,
CORE_ADDR);
+extern struct value *value_from_contents (struct type *, const gdb_byte *);
extern struct value *default_value_from_register (struct type *type,
int regnum,
extern struct value *value_zero (struct type *type, enum lval_type lv);
-extern struct value *value_one (struct type *type, enum lval_type lv);
+extern struct value *value_one (struct type *type);
extern struct value *value_repeat (struct value *arg1, int count);
extern CORE_ADDR parse_and_eval_address (char *exp);
-extern CORE_ADDR parse_and_eval_address_1 (char **expptr);
-
extern LONGEST parse_and_eval_long (char *exp);
extern void unop_promote (const struct language_defn *language,
/* C++ */
-extern struct value *value_of_this (int complain);
+extern struct value *value_of_this (const struct language_defn *lang,
+ int complain);
extern struct value *value_x_binop (struct value *arg1, struct value *arg2,
enum exp_opcode op,
extern int unop_user_defined_p (enum exp_opcode op, struct value *arg1);
-extern int destructor_name_p (const char *name, const struct type *type);
+extern int destructor_name_p (const char *name, struct type *type);
extern void value_incref (struct value *val);
extern struct value *value_allocate_space_in_inferior (int);
-extern struct value *value_of_local (const char *name, int complain);
-
extern struct value *value_subscripted_rvalue (struct value *array,
LONGEST index, int lowerbound);