Re: GDB 8.2.90 available for testing

Tom Tromey
2019-03-14T17:32:45Z

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

>> From: Tom Tromey <tom@tromey.com>
>> Cc: Tom Tromey <tom@tromey.com>, palves@redhat.com, brobecker@adacore.com, gdb-patches@sourceware.org
>> Date: Fri, 08 Mar 2019 13:57:36 -0700
>>
>> I have played with the "nonl" code a bit and I can't seem to find an
>> approach that fixes this. We may have to revert that patch :(

Eli> Maybe we should ask on bug-ncurses@gnu.org, perhaps Thomas Dickey will
Eli> have some suggestion for dealing with this? If the only solution is
Eli> to revert, we have nothing to lose, I think.

The appended patch seems to work ok for me, at the cost of leaving the
gdb prompt in the TUI console window.

Tom

diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index ef1e88507aa..f3eb2273e6b 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -631,7 +631,7 @@ gdb_wgetch (WINDOW *win)
after the command. So, if we read \r, emit a \r now, after nl
mode has been re-entered, so that the output looks correct. */
if (r == '\r')
- puts ("\r");
+ waddch (win, '\n');
return r;
}