public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb/gdb-8.3-branch] Fix style bug when paging
Date: Wed, 08 May 2019 17:50:00 -0000	[thread overview]
Message-ID: <d0e1efa6ae35091a76023bc4e32b6b1e745fa393@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT d0e1efa6ae35091a76023bc4e32b6b1e745fa393 ***

Author: Tom Tromey <tromey@adacore.com>
Branch: gdb-8.3-branch
Commit: d0e1efa6ae35091a76023bc4e32b6b1e745fa393

Fix style bug when paging

Philippe pointed out a styling bug that would occur in some conditions
when paging:

    https://sourceware.org/ml/gdb-patches/2019-04/msg00101.html

I was finally able to reproduce this, and this patch fixes the bug.

The problem occurred when text overflowed the line, causing a
pagination prompt, but when no wrap column had been set.  In this
case, the current style was reset to show the prompt, but then not
reset back to the previously applied style before emitting the rest of
the line.

The fix is to record the applied style in this case, and re-apply it
afterward -- but only if the pager prompt was emitted, something that
the existing style.exp pointed out on the first, more naive, version
of the patch.

Tested on x86-64 Fedora 29.

gdb/ChangeLog
2019-05-08  Tom Tromey  <tromey@adacore.com>

	* utils.c (fputs_maybe_filtered): Reset style after paging, even
	when no wrap column is set.


             reply	other threads:[~2019-05-08 17:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 17:50 sergiodj+buildbot [this message]
2019-05-08 17:54 ` Failures on RHEL-s390x-m64, branch gdb-8.3-branch sergiodj+buildbot
2019-05-08 21:06 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2019-05-08 21:11 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2019-05-08 21:15 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2019-05-08 21:28 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2019-05-08 21:32 ` Failures on Fedora-i686, " sergiodj+buildbot
2019-05-08 21:58 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2019-05-09  0:44 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2019-05-09  1:18 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2019-05-09  2:16 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot

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=d0e1efa6ae35091a76023bc4e32b6b1e745fa393@gdb-build \
    --to=sergiodj+buildbot@sergiodj.net \
    --cc=gdb-testers@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).