Thread View: gnu.gdb.bug
1 messages
1 total messages
Started by John F. Peters
Sat, 25 Nov 1989 20:58
gdb-3.4 readline destroys local tty modes +FIX
Author: John F. Peters
Date: Sat, 25 Nov 1989 20:58
Date: Sat, 25 Nov 1989 20:58
45 lines
1751 bytes
1751 bytes
Description:
gdb3.4 on Vax 4.3bsd-Tahoe:
When terminal parity is set to anything other than EVENP+ODDP,
local modes are all zero after running gdb.
Repeat-By:
* Find a terminal that generates parity in the eighth bit.
* stty even -odd crt decctlq (or odd -even)
* run gdb
* stty everything
(local modes e.g. decctlq, crtbs, crterase, etc. are all gone)
Fix:
In readline/readline.c, rl_prep_terminal and rl_deprep_terminal
aren't symmetric. Incoming local modes are saved only when parity
is set to EVENP+ODDP, but later they're restored unconditionally.
Thus when parity is set to anything but EVENP+ODDP, local modes
get restored from a word that's all zero.
This fix applies the same EVENP+ODDP test at restoration time.
-----
jfp@practic.com
*** readline.c.orig Thu Oct 19 14:26:49 1989
--- readline.c Sat Nov 25 10:14:40 1989
***************
*** 2078,2084 ****
int tty = fileno (rl_instream);
#if defined (TIOCLGET) && defined (LPASS8)
! ioctl (tty, TIOCLSET, &local_mode_flags);
#endif
#ifdef TIOCSLTC
--- 2078,2085 ----
int tty = fileno (rl_instream);
#if defined (TIOCLGET) && defined (LPASS8)
! if ((the_ttybuff.sg_flags & (ODDP | EVENP)) == (ODDP | EVENP))
! ioctl (tty, TIOCLSET, &local_mode_flags);
#endif
#ifdef TIOCSLTC
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads