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/30636] New: [gdb/tui] Secondary prompt overwritten Date: Fri, 14 Jul 2023 11:23:20 +0000 [thread overview] Message-ID: <bug-30636-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=30636 Bug ID: 30636 Summary: [gdb/tui] Secondary prompt overwritten Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: tui Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- Consider this gdb session: ... $ gdb -q (gdb) define foo Type commands for definition of "foo". End with a line saying just "end". >bar >end (gdb) show user User command "foo": bar (gdb) ... Now let's try the same in TUI: ... (gdb) define foo Type commands for definition of "foo". End with a line saying just "end". (gdb) show user User command "foo": bar (gdb) ... The secondary prompt lines are not terminated with a \n, and are consequently overwritten. With this tentative patch: ... diff --git a/gdb/top.c b/gdb/top.c index 90ddc5f5ea7..f9b967c5c64 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -77,6 +77,7 @@ #if defined(TUI) # include "tui/tui.h" +# include "tui/tui-io.h" #endif #ifndef O_NOCTTY @@ -958,6 +959,9 @@ gdb_readline_wrapper_line (gdb::unique_xmalloc_ptr<char> &&line) saved_after_char_processing_hook = after_char_processing_hook; after_char_processing_hook = NULL; + if (tui_active) + tui_inject_newline_into_command_window (); + /* Prevent parts of the prompt from being redisplayed if annotations are enabled, and readline's state getting out of sync. We'll reinstall the callback handler, which puts the terminal in raw ... we get instead: ... (gdb) define foo Type commands for definition of "foo". End with a line saying just "end". >bar >end (gdb) show user User command "foo": bar (gdb) ... -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2023-07-14 11:23 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-14 11:23 vries at gcc dot gnu.org [this message] 2023-07-14 12:47 ` [Bug tui/30636] " vries at gcc dot gnu.org 2023-07-26 11:32 ` cvs-commit at gcc dot gnu.org 2023-07-26 11:33 ` 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-30636-4717@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).