Older versions of ncurses' newterm can't take NULL for their ofp and ifp
parameters. Newer versions can, and they fall back on stdout/stdin if
that is the case.
This patch explicitly passes stdout/stdin to the call to newterm to
avoid segfaulting with older ncurses.
gdb/Changelog:
2014-11-04 Simon Marchi <simon.marchi@ericsson.com>
* tui/tui.c (tui_enable): Pass stdout and stdin to newterm.
+2014-11-04 Simon Marchi <simon.marchi@ericsson.com>
+
+ * tui/tui.c (tui_enable): Pass stdout and stdin to newterm.
+
2014-11-04 Pedro Alves <palves@redhat.com>
* breakpoint.c (breakpoint_thread_match): Delete function.
if (!ui_file_isatty (gdb_stdout))
error (_("Cannot enable the TUI when output is not a terminal"));
- s = newterm (NULL, NULL, NULL);
+ s = newterm (NULL, stdout, stdin);
if (s == NULL)
{
error (_("Cannot enable the TUI: error opening terminal [TERM=%s]"),