From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 494E8385C6EE; Tue, 2 Apr 2024 14:09:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 494E8385C6EE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712066945; bh=z1FEuIcJ1+rLkDuSo6umz9YPG9ALadi+Gpv52zaOMFU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WYSkIyhDHvC/tXxqpmEyoU+u6WEXBTnJGJaO1JDWi0TVBW/yLt0Groag9+5ho7mON j03A2l+3tWbw1ZxGSLTB7Mh0AcuxNzxIoFzvlbPQoJgNItmUcg2eYElObZwPPVv6rj icHNfQptnfADOAj91OxayB6wRpQYCUm7CO1HWv9s= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tui/31522] TUI misses highlight after run to main Date: Tue, 02 Apr 2024 14:09:02 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: 15.1 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=3D31522 --- Comment #15 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db35013e29f3b= cf9028aa22291f378010420322fe commit b35013e29f3bcf9028aa22291f378010420322fe Author: Tom de Vries Date: Tue Apr 2 16:09:10 2024 +0200 [gdb/tui] Fix centering and highlighting of current line After starting TUI like this with a hello world a.out: ... $ gdb -q a.out -ex start -ex "tui enable" ... we get: ... =20=20=20 =C3=A2=C3=A2hello.c=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2= =C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3= =A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2 =C3=A2 5 { =C3=A2 =C3=A2 6 printf ("hello\n"); =C3=A2 =C3=A2 7 =C3=A2 =C3=A2 8 return 0; =C3=A2 =C3=A2 9 } =C3=A2 =C3=A2 =C3=A2 =20=20=20 =C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3= =A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2= =C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3= =A2=C3=A2=C3=A2 ... This is a regression since commit ee1e9bbb513 ("[gdb/tui] Fix displaying main after resizing"), before which we had instead: ... =20=20=20 =C3=A2=C3=A2hello.c=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2= =C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3= =A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2 =C3=A2 4 main (void) =C3=A2 =C3=A2 5 { =C3=A2 =C3=A2 > 6 [7m printf ("hello\n");[0m =C3=A2 =C3=A2 7 =C3=A2 =C3=A2 8 return 0; =C3=A2 =C3=A2 9 } =C3=A2 =20=20=20 =C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3= =A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2= =C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3= =A2=C3=A2=C3=A2 ... In other words, the problems are: - the active line (source line 6) is no longer highlighted, and - the active line is not vertically centered (screen line 2 out 6 inste= ad of screen line 3 out of 6). Fix these problems respectively by: - in tui_enable, instead of "tui_show_frame_info (0)" using 'tui_show_frame_info (deprecated_safe_get_selected_frame ())", and - in tui_source_window_base::rerender, adding centering functionality. Tested on aarch64-linux. Co-Authored-By: Tom Tromey Approved-By: Tom Tromey PR tui/31522 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31522 --=20 You are receiving this mail because: You are on the CC list for the bug.=