From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb: don't print escape characters when a style is disabled
Date: Wed, 20 Jan 2021 12:34:43 -0700 [thread overview]
Message-ID: <87k0s75rn0.fsf@tromey.com> (raw)
In-Reply-To: <f5c4b65eb6d67c65e30708956bb594570fcf5b25.1610618063.git.andrew.burgess@embecosm.com> (Andrew Burgess's message of "Thu, 14 Jan 2021 09:56:42 +0000")
>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:
Andrew> +# A replacement for the 'style' function found in gdb-utils.exp,
Andrew> +# filter out requests for the disabled style.
Andrew> +proc limited_style { str style } {
Rather than rename the global 'style', I think it would be fine to just
have a wrapper proc that is used locally. That seems a lot less tricky.
Same with clean_restart.
Andrew> /* Output pmatch with the highlight style. */
Andrew> - set_output_style (stream, highlight_style.style ());
Andrew> + if (!highlight_style.style ().is_default ())
Andrew> + set_output_style (stream, highlight_style.style ());
set_output_style ends up setting applied_style.
So avoiding this call seems iffy to me.
Maybe another approach would be to change emit_style_escape so that it
does nothing if the currently-applied style is equal to the passed-in
style?
Tom
next prev parent reply other threads:[~2021-01-20 19:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 9:56 [PATCH 0/2] Style related fixes Andrew Burgess
2021-01-14 9:56 ` [PATCH 1/2] gdb: don't print escape characters when a style is disabled Andrew Burgess
2021-01-20 19:34 ` Tom Tromey [this message]
2021-01-21 12:06 ` Andrew Burgess
2021-01-21 16:08 ` Andrew Burgess
2021-01-22 15:26 ` Tom Tromey
2021-01-22 15:21 ` Tom Tromey
2021-01-14 9:56 ` [PATCH 2/2] gdb: add new version style Andrew Burgess
2021-01-14 10:35 ` Andrew Burgess
2021-01-14 11:15 ` Lancelot SIX via Gdb-patches
2021-01-20 19:39 ` Tom Tromey
2021-01-14 14:08 ` Eli Zaretskii via Gdb-patches
2021-01-20 19:39 ` Tom Tromey
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=87k0s75rn0.fsf@tromey.com \
--to=tom@tromey.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/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