mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
gdb/
Redirect also uiout and stdtarg{,err} in execute_command_to_string. * cli-logging.c (struct saved_output_files) <targerr>: 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.
This commit is contained in:
@ -1048,6 +1048,7 @@ gdb_setup_readline (void)
|
||||
gdb_stderr = stdio_fileopen (stderr);
|
||||
gdb_stdlog = gdb_stderr; /* for moment */
|
||||
gdb_stdtarg = gdb_stderr; /* for moment */
|
||||
gdb_stdtargerr = gdb_stderr; /* for moment */
|
||||
|
||||
/* If the input stream is connected to a terminal, turn on
|
||||
editing. */
|
||||
@ -1106,6 +1107,7 @@ gdb_disable_readline (void)
|
||||
ui_file_delete (gdb_stderr);
|
||||
gdb_stdlog = NULL;
|
||||
gdb_stdtarg = NULL;
|
||||
gdb_stdtargerr = NULL;
|
||||
#endif
|
||||
|
||||
rl_callback_handler_remove ();
|
||||
|
Reference in New Issue
Block a user