This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [pushed] PR tui/16138, PR tui/17519, and misc failures to initialize the terminal
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Mon, 03 Nov 2014 21:44:03 +0000
- Subject: Re: [pushed] PR tui/16138, PR tui/17519, and misc failures to initialize the terminal
- Authentication-results: sourceware.org; auth=none
- References: <1414593363-23065-1-git-send-email-palves at redhat dot com> <5457F5A1 dot 9000406 at ericsson dot com>
Hi Simon,
On 11/03/2014 09:37 PM, Simon Marchi wrote:
> I just noticed this causes a segfault on SLED11, which is somewhat old. "zypper info libncurses5" gives version "5.6-90.55".
>
> Old ncurses' newterm doesn't like it when we pass NULL for ofp and ifp (the last two parameters). Passing NULL to name (the first parameter) is ok though.
>
> I just checked the difference in the source, and new ncurses' newterm has this:
>
> FILE *_ofp = ofp ? ofp : stdout;
> FILE *_ifp = ifp ? ifp : stdin;
>
> while the old one does not, which explains the difference in behavior. I tried to change the line for:
>
> s = newterm (NULL, stdout, stdin);
>
> and everything seems to work as usual.
>
> Do you want me to submit a patch, or are you going to take care of it yourself?
Sounds like an obvious fix then. If you could submit/push a patch, I'd
appreciate it. Just be sure to include the info above in the commit
log.
Thanks,
Pedro Alves