Package: gdb
Version: 7.8.1-1

gdb in batch mode leaves the terminal in a broken state. To reproduce, run this:

gdb -batch -ex 'run hello world' echo


Strace tells me that gdb disables echo and canonical mode, but never restores the terminal attributes:

$ strace -e ioctl -o '| grep -w TCSETSW' gdb -batch -ex 'run hello world' echo
hello world
[Inferior 1 (process 596) exited normally]
ioctl(0, SNDCTL_TMR_STOP or SNDRV_TIMER_IOCTL_GINFO or TCSETSW, {B38400 opost 
isig -icanon -echo ...}) = 0


Work-around: redirect gdb's stdin to /dev/null.

-- System Information:
Debian Release: 8.0
 APT prefers unstable
 APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages gdb depends on:
ii  libbabeltrace-ctf1  1.2.4-1
ii  libbabeltrace1      1.2.4-1
ii  libc6               2.19-13
ii  libexpat1           2.1.0-6+b3
ii  liblzma5            5.1.1alpha+20120614-2+b2
ii  libncurses5         5.9+20140913-1
ii  libpython3.4        3.4.2-3
ii  libreadline6        6.3-8+b1
ii  libtinfo5           5.9+20140913-1
ii  zlib1g              1:1.2.8.dfsg-2+b1

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to