Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org,  Patryk Sondej <patryk.sondej@gmail.com>
Subject: Re: [PATCH] gdb: fix handling of raw ANSI escape sequences printed from Python
Date: Thu, 15 Jan 2026 09:00:21 -0700	[thread overview]
Message-ID: <87h5smg92i.fsf@tromey.com> (raw)
In-Reply-To: <2b96eaf47bcb84cf955f4e59ec34c8582b5ceb81.1768475197.git.aburgess@redhat.com> (Andrew Burgess's message of "Thu, 15 Jan 2026 11:06:48 +0000")

>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:

Andrew> Prior to this commit GDB would always forward any ANSI escape
Andrew> sequences directly to the output stream, but this meant that GDB
Andrew> didn't know which style was currently in effect.

Andrew> The above commit changed GDB so that we would parse the ANSI escape
Andrew> sequence, and then apply it to the output stream, this allowed GDB to
Andrew> track which style was in use, which in turn meant that GDB could
Andrew> correctly suspend the style and reapply it when the pager was
Andrew> activated.

I think I probably didn't fully understand this patch in retrospect.

If the pager is already parsing escape sequences and reacting
accordingly, then I wonder if there's any need at all for
ui_file::emit_style_escape.

Andrew> This can be easily fixed by starting from the current style, rather
Andrew> than the default style.

Approved-By: Tom Tromey <tom@tromey.com>

Tom

  reply	other threads:[~2026-01-15 16:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 11:06 Andrew Burgess
2026-01-15 16:00 ` Tom Tromey [this message]
2026-01-15 16:51   ` Andrew Burgess
2026-01-15 17:17     ` 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=87h5smg92i.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=patryk.sondej@gmail.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