From db1ec11fff1a46f7046bcbd971a42632d2ea795c Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 8 Nov 2016 15:26:45 +0000 Subject: Use ui_file_as_string in execute_command_to_string ... and then return std::string and adjust all callers. gdb/ChangeLog: 2016-11-08 Pedro Alves * gdbcmd.h (execute_command_to_string): Now returns std::string. (lookup_struct_elt_type): Adjust to use std::string. * top.c (execute_command_to_string): Use ui_file_as_string and return std::string. * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use std::string. * python/python.c (execute_gdb_command): Adjust to use std::string. --- gdb/gdbcmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/gdbcmd.h') diff --git a/gdb/gdbcmd.h b/gdb/gdbcmd.h index 512b72c..6db49e2 100644 --- a/gdb/gdbcmd.h +++ b/gdb/gdbcmd.h @@ -128,7 +128,7 @@ extern struct cmd_list_element *showchecklist; extern struct cmd_list_element *save_cmdlist; extern void execute_command (char *, int); -extern char *execute_command_to_string (char *p, int from_tty); +extern std::string execute_command_to_string (char *p, int from_tty); enum command_control_type execute_control_command (struct command_line *); -- cgit v1.1