public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tui/30337] [gdb/tui] TUI in ansi terminal has off-by-one width problem
Date: Wed, 12 Apr 2023 11:48:05 +0000	[thread overview]
Message-ID: <bug-30337-4717-YZl1guByLv@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30337-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=30337

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> The problem seems to be related to this comment in Term::resize:
> ...
>         # Somehow the number of columns transmitted to gdb is one less      
> 
>         # than what we request from expect.  We hide this weird             
> 
>         # details from the caller.                                          
> 
>         _do_resize $_rows $cols
>         stty columns [expr {$_cols + 1}] < $::gdb_tty_name
> ...
> and indeed, after dropping the +1 in {$_cols + 1} the test passes (and ...
> without timeouts).

With "the test" I meant gdb.tui/empty.exp.

Without the patch, the test-case times out here:
...
        _do_resize $rows $_cols
        stty rows $_rows < $::gdb_tty_name
        # Due to the strange column resizing behavior, and because we           
        # don't care about this intermediate resize, we don't check             
        # the size here.                                                        
        wait_for "@@ resize done $_resize_count"
        incr _resize_count
...
because due to the garbling, the "@@ resize done $_resize_count" line is spread
over two lines.

In other words, the problem filed in this PR is not sufficiently worked around
in Term::resize.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-04-12 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 11:15 [Bug tui/30337] New: [gdb/tui] TUI in ansi terminal has one off " vries at gcc dot gnu.org
2023-04-12 11:15 ` [Bug tui/30337] [gdb/tui] TUI in ansi terminal has off-by-one " vries at gcc dot gnu.org
2023-04-12 11:48 ` vries at gcc dot gnu.org [this message]
2023-04-12 12:45 ` vries at gcc dot gnu.org
2023-04-12 13:56 ` vries at gcc dot gnu.org
2023-04-13 12:43 ` vries at gcc dot gnu.org
2023-04-13 14:11 ` vries at gcc dot gnu.org
2023-04-30 11:06 ` cvs-commit at gcc dot gnu.org
2023-04-30 11:10 ` vries at gcc dot gnu.org

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=bug-30337-4717-YZl1guByLv@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).