This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Remove buggy xterm workaround in tui_dispatch_ctrl_char()
- From: sergiodj+buildbot at redhat dot com
- To: gdb-testers at sourceware dot org
- Date: Thu, 14 May 2015 08:06:55 -0400
- Subject: [binutils-gdb] Remove buggy xterm workaround in tui_dispatch_ctrl_char()
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT e3555239e04fa6dba2a165b3b52598a880474a22 ***
Author: Patrick Palka <patrick@parcs.ath.cx>
Branch: master
Commit: e3555239e04fa6dba2a165b3b52598a880474a22
Remove buggy xterm workaround in tui_dispatch_ctrl_char()
The function tui_dispatch_ctrl_char() has an old workaround (from 1999)
for buggy terminals and/or ncurses library that don't return page
up/down keys as single characters. Because the workaround is so old, I
think the bug it is targetting is no longer relevant anymore.
But more importantly, the workaround is itself buggy: it 1) performs a
blocking call to wgetch() and 2) if the key returned by wgetch() does
not make up a relevant key sequence it throws away the input instead of
pushing it back via ungetch(). And indeed the workaround breaks Alt-key
sequences under TERM=xterm because of bug #2.
So this patch removes the buggy workaround and tidies up the function
accordingly.
I personally tested this change on a recent xterm (with TERM=xterm) in
Fedora 20 and had no problems with having ncurses properly interpret
page up/down keys. And Alt-key sequences now work when TERM=xterm too.
gdb/ChangeLog:
* tui/tui-command.c: Remove include of <ctype.h>.
(tui_dispatch_ctrl_char): Remove workaround for xterm terminals.
- Follow-Ups:
- Failures on Fedora-ppc64be-m64, branch master
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-ppc64be-cc-with-index, branch master
- Failures on Debian-i686, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686-native-gdbserver, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Debian-x86_64-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master