From 8d4d924b76392dfd191e5bc0e54381befb9af0af Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sat, 11 Sep 2010 16:00:27 +0000 Subject: gdb/ Redirect also uiout and stdtarg{,err} in execute_command_to_string. * cli-logging.c (struct saved_output_files) : New. (set_logging_redirect, pop_output_files, handle_redirections): Redirect also gdb_stdtargerr. * defs.h (struct ui_out, make_cleanup_ui_out_redirect_pop): New declarations. * event-top.c (gdb_setup_readline, gdb_disable_readline): Redirect also gdb_stdtargerr. * top.c (execute_command_to_string): Move make_cleanup_ui_file_delete to the top. Redirect also gdb_stdlog, gdb_stdtarg and gdb_stdtargerr. Use ui_out_redirect, register make_cleanup_ui_out_redirect_pop. * tui/tui-io.c (tui_setup_io): Redirect also gdb_stdtargerr. * utils.c (do_ui_out_redirect_pop, make_cleanup_ui_out_redirect_pop): New functions. gdb/testsuite/ * gdb.python/python.exp (set height 0, collect help from uiout) (verify help to uiout): New tests. --- gdb/tui/tui-io.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/tui') diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 92da76e..9dcb228 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -545,6 +545,7 @@ tui_setup_io (int mode) gdb_stderr = tui_stderr; gdb_stdlog = gdb_stdout; /* for moment */ gdb_stdtarg = gdb_stderr; /* for moment */ + gdb_stdtargerr = gdb_stderr; /* for moment */ uiout = tui_out; /* Save tty for SIGCONT. */ @@ -557,6 +558,7 @@ tui_setup_io (int mode) gdb_stderr = tui_old_stderr; gdb_stdlog = gdb_stdout; /* for moment */ gdb_stdtarg = gdb_stderr; /* for moment */ + gdb_stdtargerr = gdb_stderr; /* for moment */ uiout = tui_old_uiout; /* Restore readline. */ -- cgit v1.1