/* Support for printing Ada values for GDB, the GNU debugger.
- Copyright (C) 1986-2016 Free Software Foundation, Inc.
+ Copyright (C) 1986-2017 Free Software Foundation, Inc.
This file is part of GDB.
ada_print_floating (const gdb_byte *valaddr, struct type *type,
struct ui_file *stream)
{
- struct ui_file *tmp_stream = mem_fileopen ();
- struct cleanup *cleanups = make_cleanup_ui_file_delete (tmp_stream);
+ string_file tmp_stream;
- print_floating (valaddr, type, tmp_stream);
+ print_floating (valaddr, type, &tmp_stream);
- std::string s = ui_file_as_string (tmp_stream);
+ std::string &s = tmp_stream.string ();
size_t skip_count = 0;
/* Modify for Ada rules. */
}
else
fprintf_filtered (stream, "%s", &s[skip_count]);
-
- do_cleanups (cleanups);
}
void
(Eg: an array whose bounds are not set yet). */
ada_ensure_varsize_limit (value_type (deref_val));
+ if (value_lazy (deref_val))
+ value_fetch_lazy (deref_val);
+
val_print (value_type (deref_val),
value_embedded_offset (deref_val),
value_address (deref_val), stream, recurse + 1,