diff options
author | Pedro Alves <palves@redhat.com> | 2016-06-21 01:11:47 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-06-21 01:11:47 +0100 |
commit | 694ec099d2fca9e7d47848e8a7fc40ea3aa47a32 (patch) | |
tree | 7818be8d17e00932989d674657bf65e0f5817098 /gdb/ui-file.h | |
parent | 41fd2b0f5d958fe3056da5c7af4032b1b99d726f (diff) | |
download | gdb-694ec099d2fca9e7d47848e8a7fc40ea3aa47a32.zip gdb-694ec099d2fca9e7d47848e8a7fc40ea3aa47a32.tar.gz gdb-694ec099d2fca9e7d47848e8a7fc40ea3aa47a32.tar.bz2 |
Make out and error streams be per UI
stderr_fileopen () references stderr directly, which doesn't work when
we have a separate UI with its own stderr-like stream. So this also
adds a "errstream" to "struct ui", and plumbs stderr_fileopen to take
a stream parameter.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* event-top.c (gdb_setup_readline): Pass the UI's outstream and
errstream to stdout_fileopen and stderr_fileopen.
* exceptions.c: Include top.h.
(print_flush): Open the current UI's outstream file descriptor,
instead of hardcoding file descriptor 1.
* main.c (captured_main): Save the main UI's out and error
streams. Adjust stderr_fileopen call.
* top.h (struct ui) <outstream, errstream>: New fields.
* ui-file.c (stderr_fileopen): Add stream parameter. Use it
instead of stderr.
* ui-file.h (stderr_fileopen): Add stream parameter and update
comment.
Diffstat (limited to 'gdb/ui-file.h')
-rw-r--r-- | gdb/ui-file.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/ui-file.h b/gdb/ui-file.h index a6ec135..f6df572 100644 --- a/gdb/ui-file.h +++ b/gdb/ui-file.h @@ -135,8 +135,8 @@ extern struct ui_file *mem_fileopen (void); /* Open/create a STDIO based UI_FILE using the already open FILE. */ extern struct ui_file *stdio_fileopen (FILE *file); -/* Create a ui_file from stderr. */ -extern struct ui_file *stderr_fileopen (void); +/* Likewise, for stderr-like streams. */ +extern struct ui_file *stderr_fileopen (FILE *file); /* Open NAME returning an STDIO based UI_FILE. */ |