Subject: bin/430: gdb mangles tty settings
To: None <gnats-admin>
From: None <thomas@mathematik.uni-Bremen.de>
List: netbsd-bugs
Date: 08/21/1994 13:50:03
>Number: 430
>Category: bin
>Synopsis: gdb mangles tty settings (sgtty vs. termios)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 21 13:50:02 1994
>Originator: Thomas Eberhardt
>Organization:
CeVis, University of Bremen, Germany
>Release:
>Environment:
System: NetBSD ed209 1.0_BETA NetBSD 1.0_BETA (ED209) #0: Sat Aug 20 03:10:19 MET DST 1994 thomas@ed209:/usr/src/sys/arch/i386/compile/ED209 i386
Machine: i386
>Description:
Every time I start a program (in this case gdb) that uses the sgtty
instead of the termios terminal interface my terminal settings get
mangled, i.e. -istrip, cs8, -parenb is changed to istrip, cs7, parenb.
I've fixed this for gdb by letting it use termios.
>How-To-Repeat:
The program hello that is controlled by gdb below is just the usual
printf("hello world\n"), i.e. it doesn't do anything with the terminal
settings.
% stty -a
speed 9600 baud; 40 rows; 80 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: opost onlcr -oxtabs
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^H; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
stop = ^S; susp = ^Z; time = 0; werase = ^W;
% gdb hello
(gdb) run
Starting program: /usr/people/thomas/hello
hello, world
Program exited with code 015.
(gdb) quit
% stty -a
speed 9600 baud; 40 rows; 80 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
-extproc
iflags: istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: opost onlcr -oxtabs
cflags: cread cs7 parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^H; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
stop = ^S; susp = ^Z; time = 0; werase = ^W;
>Fix:
*** gnu/usr.bin/gdb/gdb/Makefile- Wed May 18 12:23:05 1994
--- gnu/usr.bin/gdb/gdb/Makefile Sun Aug 21 21:41:38 1994
***************
*** 20,26 ****
-DHOST_CANONICAL=\"$(MACHINE_ARCH)-netbsd\" \
-DTARGET_CANONICAL=\"$(MACHINE_ARCH)-netbsd\"
! CFLAGS+= -DNO_MMALLOC -DKERNEL_DEBUG
YFLAGS+= -p $(.PREFIX:S/-exp/_/:S/ch_/chill_/)
.PATH: $(.CURDIR)/arch/$(MACHINE_ARCH)
--- 20,26 ----
-DHOST_CANONICAL=\"$(MACHINE_ARCH)-netbsd\" \
-DTARGET_CANONICAL=\"$(MACHINE_ARCH)-netbsd\"
! CFLAGS+= -DHAVE_TERMIOS -DNO_MMALLOC -DKERNEL_DEBUG
YFLAGS+= -p $(.PREFIX:S/-exp/_/:S/ch_/chill_/)
.PATH: $(.CURDIR)/arch/$(MACHINE_ARCH)
>Audit-Trail:
>Unformatted:
------------------------------------------------------------------------------