diff options
author | Tom de Vries <tdevries@suse.de> | 2025-07-25 19:07:59 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2025-07-25 19:07:59 +0200 |
commit | 3a7f7d0be3a2953fd110f084b34586ce9c649d66 (patch) | |
tree | b0616a332a8c3dece995d367cc29f445835f5124 /libctf/testsuite/libctf-writable/libctf-errors.c | |
parent | 6d654864d9408d47dfac98358307796d4eade70b (diff) | |
download | binutils-3a7f7d0be3a2953fd110f084b34586ce9c649d66.zip binutils-3a7f7d0be3a2953fd110f084b34586ce9c649d66.tar.gz binutils-3a7f7d0be3a2953fd110f084b34586ce9c649d66.tar.bz2 |
[gdb/tui] Fix shell command terminal settings
In bash I have the following terminal settings:
...
$ stty
speed 38400 baud; line = 0;
-brkint -imaxbel iutf8
...
and then in gdb using the shell command likewise:
...
(gdb) shell stty
speed 38400 baud; line = 0;
-brkint -imaxbel iutf8
(gdb)
...
and likewise using a shell session:
...
(gdb) shell
$ stty
speed 38400 baud; line = 0;
-brkint -imaxbel iutf8
$
...
But in TUI, we get different settings (removed runaway indentation for
readability):
...
(gdb) shell sttyspeed 38400 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel iutf8
-onlcr
-icanon -echo
(gdb)
...
and consequently the shell is not really usable. This is PR tui/18215.
The easiest way to fix this is to just temporarily leave TUI while in the shell,
leaving the output of the commands in CLI mode, but that's a bit confusing.
Fix this (as suggested in the PR) by restoring the initial terminal settings
while in the shell command, such that also in TUI we have:
...
(gdb) shell sttyspeed 38400 baud; line = 0;
-brkint -imaxbel iutf8
(gdb)
...
Tested on x86_64-linux.
Reported-By: Doug Evans <dje@google.com>
Approved-By: Tom Tromey <tom@tromey.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18215
Diffstat (limited to 'libctf/testsuite/libctf-writable/libctf-errors.c')
0 files changed, 0 insertions, 0 deletions