Fix ARI warning about function names in first column.
[deliverable/binutils-gdb.git] / gdb / value.h
index 0feb92fc88a6fa2ed7162b650d43729664268a1b..0889cefc6b102acaece5a7bab2f6ec00ccca3926 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);
 
@@ -430,11 +443,25 @@ extern LONGEST unpack_long (struct type *type, const gdb_byte *valaddr);
 extern DOUBLEST unpack_double (struct type *type, const gdb_byte *valaddr,
                               int *invp);
 extern CORE_ADDR unpack_pointer (struct type *type, const gdb_byte *valaddr);
-LONGEST unpack_bits_as_long (struct type *field_type, const gdb_byte *valaddr,
-                            int bitpos, int bitsize);
+
+extern int unpack_value_bits_as_long (struct type *field_type,
+                                     const gdb_byte *valaddr,
+                                     int embedded_offset, int bitpos,
+                                     int bitsize,
+                                     const struct value *original_value,
+                                     LONGEST *result);
+
 extern LONGEST unpack_field_as_long (struct type *type,
                                     const gdb_byte *valaddr,
                                     int fieldno);
+extern int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr,
+                               int embedded_offset, int fieldno,
+                               const struct value *val, LONGEST *result);
+
+extern struct value *value_field_bitfield (struct type *type, int fieldno,
+                                          const gdb_byte *valaddr,
+                                          int embedded_offset,
+                                          const struct value *val);
 
 extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num);
 
@@ -444,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);
@@ -478,6 +506,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);
 
@@ -628,8 +662,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,
This page took 0.026339 seconds and 4 git commands to generate.