[0/3,gdb/tui] Improve handling of inferior output

Message ID 20230530105324.23089-1-tdevries@suse.de
Headers
Series Improve handling of inferior output |

Message

Tom de Vries May 30, 2023, 10:53 a.m. UTC
  When inferior output in TUI causes scrolling, the TUI screen is garbled.  This
is a known issue, PR tui/14332.

This can be fixed manually by doing ^L.

I noticed though that doing ^L removes the inferior output.

The first patch fixes this.

The third patch automates doing ^L when the gdb_tty_state changes to
target_terminal_state::is_ours, such what we no longer have to do ^L.

The second patch is an infrastructure patch used by the third patch.

Tested on x86_64-linux.

Tom de Vries (3):
  [gdb/tui] Keep inferior output in cmd window with ^L
  [gdb] Add observable terminal_owner_changed
  [gdb/tui] Refresh on target_terminal_state::is_ours

 gdb/inflow.c                    | 176 ++++++++++++++++++--------------
 gdb/observable.c                |   1 +
 gdb/observable.h                |   5 +
 gdb/testsuite/gdb.tui/hello.c   |  25 +++++
 gdb/testsuite/gdb.tui/hello.exp |  54 ++++++++++
 gdb/tui/tui-hooks.c             |  11 ++
 gdb/tui/tui-io.c                |   2 +-
 gdb/tui/tui-win.c               |  18 +++-
 gdb/tui/tui-win.h               |   2 +-
 gdb/tui/tui-wingeneral.c        |   5 +-
 gdb/tui/tui-wingeneral.h        |   2 +-
 11 files changed, 214 insertions(+), 87 deletions(-)
 create mode 100644 gdb/testsuite/gdb.tui/hello.c
 create mode 100644 gdb/testsuite/gdb.tui/hello.exp


base-commit: 796029320e75a141570220224731c8151311f8d9