/* Print values for GNU debugger GDB.
- Copyright (C) 1986-2016 Free Software Foundation, Inc.
+ Copyright (C) 1986-2017 Free Software Foundation, Inc.
This file is part of GDB.
#include "charset.h"
#include "arch-utils.h"
#include "cli/cli-utils.h"
+#include "cli/cli-script.h"
#include "format.h"
#include "source.h"
/* User specified format, so don't look to the type to tell us
what to do. */
val_print_scalar_formatted (type,
- value_contents_for_printing (val),
value_embedded_offset (val),
val,
options, size, stream);
newobj = new display ();
newobj->exp_string = xstrdup (exp);
- newobj->exp = gdb::move (expr);
+ newobj->exp = std::move (expr);
newobj->block = innermost_block;
newobj->pspace = current_program_space;
newobj->number = ++display_number;
static void
eval_command (char *arg, int from_tty)
{
- struct ui_file *ui_out = mem_fileopen ();
- struct cleanup *cleanups = make_cleanup_ui_file_delete (ui_out);
+ string_file stb;
- ui_printf (arg, ui_out);
+ ui_printf (arg, &stb);
- std::string expanded = ui_file_as_string (ui_out);
+ std::string expanded = insert_user_defined_cmd_args (stb.c_str ());
execute_command (&expanded[0], from_tty);
-
- do_cleanups (cleanups);
}
void