Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Eli Zaretskii <eliz@gnu.org>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Still some style problems with 8.3 branch
Date: Sun, 07 Apr 2019 10:08:00 -0000	[thread overview]
Message-ID: <1554631684.1854.17.camel@skynet.be> (raw)
In-Reply-To: <83wokbc5lk.fsf@gnu.org>

I have just done some tests, comparing the behaviour
of the 8.3 branch with and without the patch suggested by Eli.

It works better with the patch, but even with the patch,
I still encountered one case where the style was not
the expected style after the continuation prompt.

To reproduce (in a 80x24 terminal):

./gdb/gdb ./gdb/gdb
break cli_ui_out::do_field_string
run gdb/testsuite/outputs/gdb.ada/info_auto_lang/proc_in_ada
  (gdb) b proc_in_c
  (gdb) run
info func error
#### then type several times return at the page prompt.
#### At some point in time, you see

0x00007ffff691d360  transaction clone for std::overflow_error::overflow_error(st
--Type <RET> for more, q to quit, c to continue without paging--
d::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)

And the line after the prompt is unexpectedly in black.
This is both with and without the patch.

Philippe


On Wed, 2019-04-03 at 21:21 +0300, Eli Zaretskii wrote:
> Ping!
> 
> > Date: Sun, 31 Mar 2019 17:28:52 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > CC: gdb-patches@sourceware.org
> > 
> > > From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
> > > Date: Sat, 30 Mar 2019 11:36:51 +0100
> > > 
> > > I just encountered a styling problem with the 8.3 branch
> > > (also on the 8.4).
> > > Test executed with GNU gdb (GDB) 8.2.91.20190330-git
> > > 
> > > To reproduce:
> > >   ./gdb/gdb ./gdb/gdb
> > >   info sources
> > > and then type return successively, to see each page.
> > > After the initial page, the first line contains a file that
> > > is partially printed in green color, partially printed in black color,
> > > e.g., in the below given output.
> > > The line that starts with '--Type <RET>' is in black, as expected.
> > > Then the next line starts in green as expected.
> > > But only '/bd/home/ph' is in green.
> > > We then have 'ilippe/gdb/git/relbranch/gdb/minsyms.h,' in black.
> > > Then all is normal till the next page.
> > > 
> > > So, that seems to point at some remaining problem in the
> > > buffering/output of style/color codes.
> > 
> > I don't think it's due to buffering.  If I #ifdef away this part near
> > the end of prompt_for_continue:
> > 
> >   /* Restore the current styling.  */
> >   if (can_emit_style_escape (gdb_stdout))
> >     emit_style_escape (applied_style);
> > 
> > then the problem seems to go away.  So I think this style setting is
> > what causes the problem, probably because applied_style has the wrong
> > value here?  The incorrect style seems to start precisely from the
> > first character that exceeds the last column of a line, so I think
> > it's indeed due to the above snippet.
> > 
> > Tom, can you look into this, please?
> > 


  parent reply	other threads:[~2019-04-07 10:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30 10:36 Philippe Waroquiers
2019-03-31 14:28 ` Eli Zaretskii
2019-04-03 18:21   ` Eli Zaretskii
2019-04-03 20:07     ` Tom Tromey
2019-04-07 10:08     ` Philippe Waroquiers [this message]
2019-04-11 19:21       ` Tom Tromey
2019-04-11 21:02         ` Philippe Waroquiers
2019-04-11 19:20   ` Tom Tromey
2019-04-12 12:39     ` Eli Zaretskii

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=1554631684.1854.17.camel@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --cc=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