/* 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;
{
struct ui_file *ui_out = mem_fileopen ();
struct cleanup *cleanups = make_cleanup_ui_file_delete (ui_out);
- char *expanded;
ui_printf (arg, ui_out);
- expanded = ui_file_xstrdup (ui_out, NULL);
- make_cleanup (xfree, expanded);
+ std::string expanded = ui_file_as_string (ui_out);
- execute_command (expanded, from_tty);
+ expanded = insert_user_defined_cmd_args (expanded.c_str ());
+
+ execute_command (&expanded[0], from_tty);
do_cleanups (cleanups);
}