* valops.c (value_of_local): Complain if NAME is NULL.
[deliverable/binutils-gdb.git] / gdb / value.h
index 5bd48e01e02f49a647296e237baeaaad4250f72c..65d0a0249a05ca8c8dd05187729978ed2b295037 100644 (file)
@@ -368,6 +368,10 @@ extern int value_bits_synthetic_pointer (const struct value *value,
 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.  */
 
@@ -375,12 +379,21 @@ extern void mark_value_bytes_unavailable (struct value *value,
                                          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
@@ -406,7 +419,7 @@ extern int value_available_contents_eq (const struct value *val1, int offset1,
    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);
 
@@ -458,6 +471,7 @@ extern struct value *value_from_pointer (struct type *type, CORE_ADDR addr);
 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);
@@ -465,6 +479,7 @@ 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,
@@ -492,6 +507,12 @@ extern struct value *read_var_value (struct symbol *var,
 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);
 
@@ -642,8 +663,6 @@ extern struct type *parse_and_eval_type (char *p, int length);
 
 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,
@@ -718,7 +737,7 @@ extern int binop_user_defined_p (enum exp_opcode op, struct value *arg1,
 
 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);
 
This page took 0.049716 seconds and 4 git commands to generate.