tui: Fix newterm call for older ncurses
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.
This commit is contained in:
parent
441ef17f09
commit
c87e6d0015
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2014-11-04 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* breakpoint.c (breakpoint_thread_match): Delete function.
|
* breakpoint.c (breakpoint_thread_match): Delete function.
|
||||||
|
|
|
@ -424,7 +424,7 @@ tui_enable (void)
|
||||||
if (!ui_file_isatty (gdb_stdout))
|
if (!ui_file_isatty (gdb_stdout))
|
||||||
error (_("Cannot enable the TUI when output is not a terminal"));
|
error (_("Cannot enable the TUI when output is not a terminal"));
|
||||||
|
|
||||||
s = newterm (NULL, NULL, NULL);
|
s = newterm (NULL, stdout, stdin);
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
{
|
{
|
||||||
error (_("Cannot enable the TUI: error opening terminal [TERM=%s]"),
|
error (_("Cannot enable the TUI: error opening terminal [TERM=%s]"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue