Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 5/5] Add zebra-striping to CLI table display
Date: Fri, 12 Jun 2026 18:14:47 +0300	[thread overview]
Message-ID: <868q8jokns.fsf@gnu.org> (raw)
In-Reply-To: <20260612-submit-zebra-style-v1-5-cfd00b5c984c@tromey.com> (message from Tom Tromey on Fri, 12 Jun 2026 08:25:25 -0600)

> From: Tom Tromey <tom@tromey.com>
> Date: Fri, 12 Jun 2026 08:25:25 -0600
> Cc: Tom Tromey <tom@tromey.com>
> 
> This patch adds two new style settings to gdb.  These can be used to
> add "zebra striping" to CLI tables -- that is, change the prevailing
> style of alternating lines of a table.
> 
> Modifying the CLI ui-out is sufficient for most tables.  However, this
> did not work for stack traces, because those aren't ordinary tables.
> This patch uses the "phony table" support (added earlier in this
> series) to achieve the same effect without otherwise impacting stack
> trace display.
> 
> By default, styles are only changed if 256 colors are available.  This
> way we can choose a relatively innocuous grey background.
> 
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32285
> ---
>  gdb/NEWS                               | 10 +++++
>  gdb/cli-out.c                          | 24 +++++++++--
>  gdb/cli-out.h                          | 10 +++++
>  gdb/cli/cli-style.c                    | 43 +++++++++++++++++-
>  gdb/cli/cli-style.h                    |  6 ++-
>  gdb/doc/gdb.texinfo                    |  8 ++++
>  gdb/stack.c                            |  6 +++
>  gdb/testsuite/gdb.base/style.exp       |  3 ++
>  gdb/testsuite/gdb.base/zebra-style.c   | 32 ++++++++++++++
>  gdb/testsuite/gdb.base/zebra-style.exp | 79 ++++++++++++++++++++++++++++++++++
>  gdb/testsuite/lib/gdb-utils.exp        | 14 +++---
>  gdb/ui-out.c                           |  8 +++-
>  gdb/ui-out.h                           |  2 +
>  gdb/utils.c                            |  6 +++
>  14 files changed, 238 insertions(+), 13 deletions(-)

Thanks, the documentation parts are okay.  However, maybe we should
include "table" in the names of these command?  Like "set style table
even" and "set style table odd" or something?  That'd allow us to add
more styles specific to tables in the future.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>

  reply	other threads:[~2026-06-12 15:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 14:25 [PATCH 0/5] Add zebra-striping to CLI tables Tom Tromey
2026-06-12 14:25 ` [PATCH 1/5] Ensure tgetent is called before tgetnum Tom Tromey
2026-06-12 14:25 ` [PATCH 2/5] Make two ui_out methods 'private' Tom Tromey
2026-06-12 14:25 ` [PATCH 3/5] Allow "phony" ui-out tables Tom Tromey
2026-06-12 14:25 ` [PATCH 4/5] Add ui_file_style::merge Tom Tromey
2026-06-12 14:25 ` [PATCH 5/5] Add zebra-striping to CLI table display Tom Tromey
2026-06-12 15:14   ` Eli Zaretskii [this message]
2026-06-13 14:28   ` Matt Rice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868q8jokns.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox