public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] [gdb/tui] Allow highlighting in windows contents to be switched off
@ 2023-05-16  8:43 Tom de Vries
  2023-05-16  8:43 ` [PATCH 1/3] [gdb/tui] Add set tui status-window-mode <mode> Tom de Vries
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tom de Vries @ 2023-05-16  8:43 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

While trying to stress test TUI by stepi-ing through some program using the
press-and-hold-enter method, I noticed the highlighting of the current execution
point and the changed registers, and found it a bit intrusive.

I decided to make all highlighting in windows contents optional (in window
borders it already is).

Also the entire contents of the status window is highlighted, so I've added a
"set tui status-window-mode <mode>", similar to border-mode and
active-border-mode.  The highlighting is static, while the highlighting in
other windows is dynamic, so I figured it deserves its own option.

For the disassembly, source and register window, I've introduced
"set tui contents-highlight on/off".  Note that I could have used also a <mode>
argument, but in the disassembly and source window we use reverse while
in the register window we use standout, so that would have meant changing the
default for one or the other.  Alternatively, we could have added independent
options for this "set tui source-highlight-mode <mode>" and
"set tui regs-highlight-mode <mode>", but I was not sure whether that was
splitting up control of behavour in too much detail.

After playing around with the "set tui contents-highlight off" setting, I
noticed that while in the source and assembly window you can still see the
current execution point (indicated by a ">" marker), that's no longer the case
for the changed registers in the registers window.  So I added a ">" marker
there as well.

In order to be able to test this, I've added the ability to annotate a tuiterm
line with the active attributes changes, such that "set tui status-window-mode
standout" looks like this:
...
   <reverse:1>exec No process In:                   L??   PC: ?? <reverse:0>
...
and "set tui status-window-mode normal" looks like this:
...
   exec No process In:                   L??   PC: ??
...

Tested on x86_64-linux.

Tom de Vries (3):
  [gdb/tui] Add set tui status-window-mode <mode>
  [gdb/tui] Use ">" marker in register window
  [gdb/tui] Add set tui contents-highlight on/off

 gdb/doc/gdb.texinfo              | 13 +++++
 gdb/testsuite/gdb.tui/basic.exp  | 13 +++++
 gdb/testsuite/gdb.tui/regs-2.c   | 36 ++++++++++++
 gdb/testsuite/gdb.tui/regs-2.exp | 66 ++++++++++++++++++++++
 gdb/testsuite/gdb.tui/source.exp | 59 ++++++++++++++++++++
 gdb/testsuite/lib/tuiterm.exp    | 84 +++++++++++++++++++++-------
 gdb/tui/tui-regs.c               | 49 ++++++++++++++--
 gdb/tui/tui-regs.h               |  4 +-
 gdb/tui/tui-stack.c              | 10 +---
 gdb/tui/tui-win.c                | 95 ++++++++++++++++++++++++++++++++
 gdb/tui/tui-win.h                |  7 +++
 gdb/tui/tui-winsource.c          |  4 +-
 12 files changed, 406 insertions(+), 34 deletions(-)
 create mode 100644 gdb/testsuite/gdb.tui/regs-2.c
 create mode 100644 gdb/testsuite/gdb.tui/regs-2.exp
 create mode 100644 gdb/testsuite/gdb.tui/source.exp


base-commit: b10f2cd3f3c3b25c71e50a342fb46f9eb9eba792
-- 
2.35.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-22 12:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16  8:43 [PATCH 0/3] [gdb/tui] Allow highlighting in windows contents to be switched off Tom de Vries
2023-05-16  8:43 ` [PATCH 1/3] [gdb/tui] Add set tui status-window-mode <mode> Tom de Vries
2023-05-16 15:01   ` Eli Zaretskii
2023-05-19 19:11   ` Tom Tromey
2023-05-22 12:15     ` Tom de Vries
2023-05-16  8:43 ` [PATCH 2/3] [gdb/tui] Use ">" marker in register window Tom de Vries
2023-05-16  8:43 ` [PATCH 3/3] [gdb/tui] Add set tui contents-highlight on/off Tom de Vries
2023-05-16 15:02   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).