diff options
author | Yao Qi <yao@codesourcery.com> | 2013-08-28 12:25:05 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-08-28 12:25:05 +0000 |
commit | ffa4ac956c9389aee7e46708492f61fdd69cd845 (patch) | |
tree | 8e86ad404795f41d9d7a88dcec2bf69b668f9a33 /gdb/main.c | |
parent | 7e1050317266448c0496db46eadd546410b07c0a (diff) | |
download | gdb-ffa4ac956c9389aee7e46708492f61fdd69cd845.zip gdb-ffa4ac956c9389aee7e46708492f61fdd69cd845.tar.gz gdb-ffa4ac956c9389aee7e46708492f61fdd69cd845.tar.bz2 |
gdb/
* event-top.c (gdb_setup_readline): Call stderr_fileopen
instead of stdio_fileopen.
* main.c (captured_main) [__MINGW32__]: Set stderr unbuffered.
.Call stderr_fileopen instead of stdio_fileopen.
* ui-file.c [__MINGW32__] (stderr_file_write): New function.
[__MINGW32__] (stderr_file_fputs): New function.
(stderr_fileopen): New function.
* ui-file.h (stderr_fileopen): Declare.
Diffstat (limited to 'gdb/main.c')
-rw-r--r-- | gdb/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -375,8 +375,15 @@ captured_main (void *data) saved_command_line[0] = '\0'; instream = stdin; +#ifdef __MINGW32__ + /* Ensure stderr is unbuffered. A Cygwin pty or pipe is implemented + as a Windows pipe, and Windows buffers on pipes. */ + setvbuf (stderr, NULL, _IONBF, BUFSIZ); +#endif + gdb_stdout = stdio_fileopen (stdout); - gdb_stderr = stdio_fileopen (stderr); + gdb_stderr = stderr_fileopen (); + gdb_stdlog = gdb_stderr; /* for moment */ gdb_stdtarg = gdb_stderr; /* for moment */ gdb_stdin = stdio_fileopen (stdin); |