Patchwork GDB 8.2.90 available for testing

login
register
mail settings
Submitter Tom Tromey
Date March 14, 2019, 5:32 p.m.
Message ID <878sxhfjk7.fsf@tromey.com>
Download mbox | patch
Permalink /patch/31853/
State New
Headers show

Comments

Tom Tromey - March 14, 2019, 5:32 p.m.
>>>>> "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
Eli Zaretskii - March 14, 2019, 6:25 p.m.
> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>,  palves@redhat.com,  brobecker@adacore.com,  gdb-patches@sourceware.org
> Date: Thu, 14 Mar 2019 11:32:40 -0600
> 
> The appended patch seems to work ok for me, at the cost of leaving the
> gdb prompt in the TUI console window.

Is this patch relative to the GDB 8.2.90 sources, or should it be
applied after removing the nonl parts?  I'd like to try using the
patch.

Thanks.
Tom Tromey - March 15, 2019, 12:55 p.m.
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

Eli> Is this patch relative to the GDB 8.2.90 sources, or should it be
Eli> applied after removing the nonl parts?  I'd like to try using the
Eli> patch.

It's relative to a clean checkout.  It should apply fine to either 8.3
or the master branch.

Tom

Patch

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;
 }