struct gdbarch *, CORE_ADDR,
struct ui_file *, int);
+/* Returns true if VAL is of floating-point type. In addition,
+ throws an error if the value is an invalid floating-point value. */
+extern bool is_floating_value (struct value *val);
+
extern LONGEST value_as_long (struct value *val);
extern DOUBLEST value_as_double (struct value *val);
extern CORE_ADDR value_as_address (struct value *val);
free_to_mark ();
}
+ scoped_value_mark (scoped_value_mark &&other) = default;
+
+ DISABLE_COPY_AND_ASSIGN (scoped_value_mark);
+
/* Free the values currently on the value stack. */
void free_to_mark ()
{
extern void value_free (struct value *val);
+/* A free policy class to interface std::unique_ptr with
+ value_free. */
+
+struct value_deleter
+{
+ void operator() (struct value *value) const
+ {
+ value_free (value);
+ }
+};
+
+/* A unique pointer to a struct value. */
+
+typedef std::unique_ptr<struct value, value_deleter> gdb_value_up;
+
extern void free_all_values (void);
extern void free_value_chain (struct value *v);
extern void print_floating (const gdb_byte *valaddr, struct type *type,
struct ui_file *stream);
-extern void print_decimal_floating (const gdb_byte *valaddr, struct type *type,
- struct ui_file *stream);
-
extern void value_print (struct value *val, struct ui_file *stream,
const struct value_print_options *options);