From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF9D13858D28; Wed, 12 Apr 2023 11:48:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF9D13858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681300085; bh=t95rhaLVudbOyv+4XqXztEgCWn5KWpOZNArWi8kpGCE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vxeREDgAiZf1HgjL8e7eRPwbD8VvT8vHEEbiFuW1nDhH28pLul2fn2E3LTGSaDNbJ zjeLqvowKEM7ktWJJPLhPM1/kE+/5bUTMHKSFHZ2pK3VcjfEW6e2a70GPwoJPXTgbY 68OOuopaO9ebI1WIs2knzf2y933QAizBe390lA4k= From: "vries at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tui X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30337 --- Comment #1 from Tom de Vries --- (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=20= =20=20=20=20=20 >=20 > # than what we request from expect. We hide this weird=20=20=20= =20=20=20=20=20=20=20=20=20=20 >=20 > # details from the caller.=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 >=20 > _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=20=20= =20=20=20=20=20=20=20=20=20 # don't care about this intermediate resize, we don't check=20=20= =20=20=20=20=20=20=20=20=20=20=20 # the size here.=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 wait_for "@@ resize done $_resize_count" incr _resize_count ... because due to the garbling, the "@@ resize done $_resize_count" line is sp= read over two lines. In other words, the problem filed in this PR is not sufficiently worked aro= und in Term::resize. --=20 You are receiving this mail because: You are on the CC list for the bug.=