public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Giah de Barag <gdb@crelg.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Enabled TUI mode on MSYS2
Date: Wed, 14 Sep 2016 02:42:00 -0000	[thread overview]
Message-ID: <83d1k78an5.fsf@gnu.org> (raw)
In-Reply-To: <1E55DA7D-4F01-49BB-99FF-5A79933415A4@crelg.com> (message from	Giah de Barag on Tue, 13 Sep 2016 17:20:52 -0400)

> From: Giah de Barag <gdb@crelg.com>
> Date: Tue, 13 Sep 2016 17:20:52 -0400
> 
> Here is a patch and a build recipe for GDB on MSYS2 to enable TUI mode.

I don't think there's a need for any patches, I regularly build GDB
for Windows with TUI support.  See the binaries on the ezwinports
site.  All that's needed is to specify TUI support at configure time.

> Eli Zaretski (https://www.sourceware.org/ml/gdb/2014-12/msg00039.html)
> comments that he had to “hide libncurses from the configure script in order to
> build a working debugger.” This comment might be dated.

Yes, it is.  The issues that caused me do that were fixed long ago.

> GDB with TUI mode works fine on MSYS2 with curses, with this small patch. I saw
> that getch() (which becomes the ncurses getch() when you link in ncurses) in
> input.c returns EOF as soon as you hit any character. Fortunately, Windows
> conio has deprecated getch() and has defined _getch() in its place. So I
> changed it to _getch(), to access the conio version.

I submitted such a patch to the Readline maintainer many moons ago,
and the patch is already in the Readline sources.  The problem is that
GDB uses its own copy of an old Readline, and all my requests to
import a new version of Readline failed.  Until GDB does importa a new
version of Readline, this (and other) patches I submitted for Readline
will not be in GDB.

> There is a tiny issue now that with this conio _getch(), gdb does not properly
> process backspace characters.

I see no such problems in my binaries.
> Someone with understanding of event handling by gdb, Windows conio, and UNIX
> curses: Can you please look where there is “getch()” in rl_getc() in input.c
> and see why it returns EOF no matter what (when linking with ncurses).

That's what ncurses' getch does.  It's not a bug.  GDB simply should
not use that function in the MinGW build.

Thanks.

  reply	other threads:[~2016-09-14  2:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13 21:21 Giah de Barag
2016-09-14  2:42 ` Eli Zaretskii [this message]
2016-09-14  6:32   ` Giah de Barag
2016-09-14 17:22     ` Eli Zaretskii
2016-09-14 17:33       ` Pedro Alves
2016-09-14 18:33       ` Giah de Barag
2016-09-14 18:36         ` Pedro Alves
2016-09-14 18:59           ` Eli Zaretskii
2016-09-14 19:04             ` Pedro Alves
2016-09-17  8:53               ` Eli Zaretskii
2016-09-17  9:39                 ` Eli Zaretskii
2016-09-18 23:40                   ` Pedro Alves
2016-09-20 22:45                   ` Sergio Durigan Junior

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=83d1k78an5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=gdb@crelg.com \
    /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: link
Be 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).