Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Giah de Barag <gdb@crelg.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: Enabled TUI mode on MSYS2
Date: Wed, 14 Sep 2016 06:32:00 -0000	[thread overview]
Message-ID: <B0760973-DB74-4F8C-9C7E-7F1E539C912B@crelg.com> (raw)
In-Reply-To: <83d1k78an5.fsf@gnu.org>

> From: Eli Zaretskii <eliz@gnu.org>
> Date: Sep 13, 2016, at 22:42
> 
>> 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.

Question below refers to this statement.

>> 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.

I do not understand the apparent conflict between this statement, that “GDB simply should not use that function in the MinGW build,” and the statement above, “I don't think there's a need for any patches.” How should one not use that function without affecting the source? Has this patch (changing getch to _getch) already been applied somewhere other than 7.11 (where I happen to be focused)?

> Thanks.

Thank you.


  reply	other threads:[~2016-09-14  6:32 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
2016-09-14  6:32   ` Giah de Barag [this message]
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=B0760973-DB74-4F8C-9C7E-7F1E539C912B@crelg.com \
    --to=gdb@crelg.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@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: 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