public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-30325-4717-iSHGrcExf1@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-30325-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=30325 --- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=58b77c6af2ed391b263460ef37285ee5cfebc69f commit 58b77c6af2ed391b263460ef37285ee5cfebc69f Author: Tom de Vries <tdevries@suse.de> 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: ... ââ/home/vries/hello.cââââââââââââââââââââââââââââââââââââââââ â 5 { â âB+> 6 printf ("hello\n"); â â 7 return 0; â â 8 } â â 9 â â ... where the left margin is the part holding "B+>" and the line number, and the disassembly window: ... âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ â 0x555555555149 <main> endbr64 â â 0x55555555514d <main+4> push %rbp â â 0x55555555514e <main+5> mov %rsp,%rbp â âB+> 0x555555555151 <main+8> lea 0xeac(%rip),%raxâ â 0x555555555158 <main+15> mov %rax,%rdi â ... 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: ... ââ/home/vries/hello.cââââââââââââââââââââââââââââââââââââââââ â___000005__{ â âB+>000006__ printf ("hello\n"); â â___000007__ return 0; â â___000008__} â ... and this for the disassembly window: ... âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ â___ 0x555555555149 <main> endbr64 â â___ 0x55555555514d <main+4> push %rbp â â___ 0x55555555514e <main+5> mov %rsp,%rbp â âB+> 0x555555555151 <main+8> lea 0xeac(%rip),%raxâ â___ 0x555555555158 <main+15> mov %rax,%rdi â ... 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: ... âB+>[0x555555555151 <main+8> lea 0xeac(%rip),%raxâ ... 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: ... ââ/home/vries/hello.cââââââââââââââââââââââââââââââââââââââââ â___000005_ { â âB+>000006_ printf ("hello\n"); â â___000007_ return 0; â â___000008_ } â ... showing a similar problem at the space between '_' and '{'. Tested on x86_64-linux. Reviewed-By: Eli Zaretskii <eliz@gnu.org> Approved-By: Tom Tromey <tom@tromey.com> -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2023-04-12 22:18 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-07 9:10 [Bug tui/30325] New: " vries at gcc dot gnu.org 2023-04-07 9:13 ` [Bug tui/30325] " vries at gcc dot gnu.org 2023-04-07 9:55 ` vries at gcc dot gnu.org 2023-04-07 12:27 ` tromey at sourceware dot org 2023-04-07 14:25 ` vries at gcc dot gnu.org 2023-04-07 16:13 ` vries at gcc dot gnu.org 2023-04-11 8:24 ` vries at gcc dot gnu.org 2023-04-12 22:18 ` cvs-commit at gcc dot gnu.org [this message] 2023-04-12 22:18 ` cvs-commit at gcc dot gnu.org 2023-04-12 22:19 ` 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-30325-4717-iSHGrcExf1@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: linkBe 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).