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 *allocate_value (struct type *type);
extern struct value *allocate_value_lazy (struct type *type);
extern void allocate_value_contents (struct value *value);
+extern void value_contents_copy (struct value *dst, int dst_offset,
+ struct value *src, int src_offset,
+ int length);
+extern void value_contents_copy_raw (struct value *dst, int dst_offset,
+ struct value *src, int src_offset,
+ int length);
extern struct value *allocate_repeat_value (struct type *type, 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,
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);