aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h41
1 files changed, 35 insertions, 6 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 71d0ba1..5d241ab 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -167,7 +167,7 @@ public:
type *type = nullptr);
/* Same as `allocate_register_lazy`, but make the value non-lazy.
-
+
The caller is responsible for filling the value's contents. */
static struct value *allocate_register (const frame_info_ptr &next_frame,
int regnum, type *type = nullptr);
@@ -1058,10 +1058,19 @@ extern gdb_mpz value_as_mpz (struct value *val);
extern LONGEST unpack_long (struct type *type, const gdb_byte *valaddr);
extern CORE_ADDR unpack_pointer (struct type *type, const gdb_byte *valaddr);
+/* Unpack a field FIELDNO of the specified TYPE, from the anonymous
+ object at VALADDR. See unpack_bits_as_long for more details. */
+
extern LONGEST unpack_field_as_long (struct type *type,
const gdb_byte *valaddr,
int fieldno);
+/* Unpack a field, FIELD, from the anonymous object at VALADDR. See
+ unpack_bits_as_long for more details. */
+
+extern LONGEST unpack_field_as_long (const gdb_byte *valaddr,
+ struct field *field);
+
/* Unpack a bitfield of the specified FIELD_TYPE, from the object at
VALADDR, and store the result in *RESULT.
The bitfield starts at BITPOS bits and contains BITSIZE bits; if
@@ -1147,9 +1156,12 @@ extern struct value *address_of_variable (struct symbol *var,
extern value *value_of_register (int regnum, const frame_info_ptr &next_frame);
-/* Same as the above, but the value is not fetched. */
+/* Same as the above, but the value is not fetched. If TYPE is
+ non-nullptr, use it as the value type. Otherwise, 'register_type'
+ will be used to obtain the type. */
-extern value *value_of_register_lazy (const frame_info_ptr &next_frame, int regnum);
+extern value *value_of_register_lazy (const frame_info_ptr &next_frame,
+ int regnum, struct type *type = nullptr);
/* Return the symbol's reading requirement. */
@@ -1556,10 +1568,27 @@ extern int val_print_string (struct type *elttype, const char *encoding,
struct ui_file *stream,
const struct value_print_options *options);
+/* Print the value in stack frame FRAME of a variable specified by a
+ struct symbol. STREAM is the ui_file on which to print the value.
+ INDENT specifies the number of indent levels to print before
+ printing the variable name. LANGUAGE is the language to use for
+ printing. */
+
+extern void print_variable_value (symbol *var,
+ const frame_info_ptr &frame,
+ ui_file *stream, int indent,
+ const language_defn *language);
+
+/* Print the value in stack frame FRAME of a variable specified by a
+ struct symbol. NAME is the name to print; if NULL then VAR's print
+ name will be used. STREAM is the ui_file on which to print the
+ value. INDENT specifies the number of indent levels to print
+ before printing the variable name. */
+
extern void print_variable_and_value (const char *name,
- struct symbol *var,
+ symbol *var,
const frame_info_ptr &frame,
- struct ui_file *stream,
+ ui_file *stream,
int indent);
extern void typedef_print (struct type *type, struct symbol *news,
@@ -1577,7 +1606,7 @@ extern struct value *make_cv_value (int, int, struct value *);
extern struct value *varying_to_slice (struct value *);
-extern struct value *value_slice (struct value *, int, int);
+extern struct value *value_slice (struct value *, LONGEST, LONGEST);
/* Create a complex number. The type is the complex type; the values
are cast to the underlying scalar type before the complex number is