From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BDD463858C66; Wed, 12 Apr 2023 22:18:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDD463858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681337889; bh=29QmLHq0oDj0uy3QDbTv0La94QMoac1ud8rIB0OkcLA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nAj3h8nwKt3x3U+qAHob6iFN7TqeAn8CH+ClIeOR4wr+3+QAwTiv5x6QK648JhQxx DRUvua4+UbP0jEpx42Ajz1ITjcHGVty9n1+tGDDx6r39MBH5XL+EGzfH5vkU2tAXfB gHep5HgdXBDEWW7UxQS/WcBDMRgj0GESibiJqbRA= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tui/30325] [gdb/tui] Stray '[' before insn adddress Date: Wed, 12 Apr 2023 22:18:09 +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: cvs-commit 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=3D30325 --- Comment #6 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D58b77c6af2ed= 391b263460ef37285ee5cfebc69f commit 58b77c6af2ed391b263460ef37285ee5cfebc69f Author: Tom de Vries Date: Thu Apr 13 00:18:12 2023 +0200 [gdb/tui] Add maint set/show tui-left-margin-verbose The TUI has two types of windows derived from tui_source_window_base: - tui_source_window (the source window), and - tui_disasm_window (the disassembly window). The two windows share a common concept: the left margin. With a hello world a.out, we can see the source window: ... =20=20=20 =C3=A2=C3=A2/home/vries/hello.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= =C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2 =C3=A2 5 { =C3=A2 =C3=A2B+> 6 printf ("hello\n"); =C3=A2 =C3=A2 7 return 0; =C3=A2 =C3=A2 8 } =C3=A2 =C3=A2 9 =C3=A2 =C3=A2 ... where the left margin is the part holding "B+>" and the line number, and the disassembly window: ... =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=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 0x555555555149
endbr64 =C3=A2 =C3=A2 0x55555555514d push %rbp =C3=A2 =C3=A2 0x55555555514e mov %rsp,%rbp =C3=A2 =C3=A2B+> 0x555555555151 lea 0xeac(%rip),%rax=C3=A2 =C3=A2 0x555555555158 mov %rax,%rdi =C3=A2 ... where the left margin is just the bit holding "B+>". Because the left margin contains some spaces, it's not clear where it starts and ends, making it harder to observe problems related to it. Add a new maintenance command "maint set tui-left-margin-verbose", that when set to on replaces the spaces in the left margin with either '_' or '0', giving us this for the source window: ... =20=20=20 =C3=A2=C3=A2/home/vries/hello.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= =C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2 =C3=A2___000005__{ =C3=A2 =C3=A2B+>000006__ printf ("hello\n"); =C3=A2 =C3=A2___000007__ return 0; =C3=A2 =C3=A2___000008__} =C3=A2 ... and this for the disassembly window: ... =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=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___ 0x555555555149
endbr64 =C3=A2 =C3=A2___ 0x55555555514d push %rbp =C3=A2 =C3=A2___ 0x55555555514e mov %rsp,%rbp =C3=A2 =C3=A2B+> 0x555555555151 lea 0xeac(%rip),%rax=C3=A2 =C3=A2___ 0x555555555158 mov %rax,%rdi =C3=A2 ... Note the space between "B+>" and 0x555555555151. The space shows that a bit of the left margin is not written, a problem reported as PR tui/30325. Specifically, PR tui/30325 is about the fact that the '[' character from the string "[ No Assembly Available ]" ends up in that same spot: ... =C3=A2B+>[0x555555555151 lea 0xeac(%rip),%rax=C3=A2 ... which only happens for certain window widths. The new command allows us to spot the problem with any window width. Likewise, when we revert the fix from commit 1b6d4bb2232 ("Redraw both spaces between line numbers and source code"), we have: ... =20=20=20 =C3=A2=C3=A2/home/vries/hello.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= =C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2=C3=A2 =C3=A2___000005_ { =C3=A2 =C3=A2B+>000006_ printf ("hello\n"); =C3=A2 =C3=A2___000007_ return 0; =C3=A2 =C3=A2___000008_ } =C3=A2 ... showing a similar problem at the space between '_' and '{'. Tested on x86_64-linux. Reviewed-By: Eli Zaretskii Approved-By: Tom Tromey --=20 You are receiving this mail because: You are on the CC list for the bug.=