aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index e4711e9..dab4f53 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -2717,18 +2717,13 @@ printf_command (char *arg, int from_tty)
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);
-
- expanded = insert_user_defined_cmd_args (expanded.c_str ());
+ std::string expanded = insert_user_defined_cmd_args (stb.c_str ());
execute_command (&expanded[0], from_tty);
-
- do_cleanups (cleanups);
}
void