From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16071 invoked by alias); 14 Sep 2016 06:32:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 16061 invoked by uid 89); 14 Sep 2016 06:32:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*Ad:U*eliz, HTo:U*eliz, site X-HELO: telf.telf.com Received: from tel.telf.com (HELO telf.telf.com) (192.254.205.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Sep 2016 06:32:13 +0000 Received: from rrcs-70-60-125-182.midsouth.biz.rr.com ([70.60.125.182]:19479 helo=[10.0.9.33]) by telf.telf.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1bk3jv-0006NI-Ek; Wed, 14 Sep 2016 02:32:11 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Enabled TUI mode on MSYS2 From: Giah de Barag In-Reply-To: <83d1k78an5.fsf@gnu.org> Date: Wed, 14 Sep 2016 06:32:00 -0000 Cc: gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <1E55DA7D-4F01-49BB-99FF-5A79933415A4@crelg.com> <83d1k78an5.fsf@gnu.org> To: Eli Zaretskii X-Get-Message-Sender-Via: telf.telf.com: authenticated_id: gdb@crelg.com X-SW-Source: 2016-09/txt/msg00105.txt.bz2 > From: Eli Zaretskii > Date: Sep 13, 2016, at 22:42 >=20 >> From: Giah de Barag >> Date: Tue, 13 Sep 2016 17:20:52 -0400 >>=20 >> Here is a patch and a build recipe for GDB on MSYS2 to enable TUI mode. >=20 > 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 =E2=80=9Chide libncurses from the configure scri= pt in order to >> build a working debugger.=E2=80=9D This comment might be dated. >=20 > Yes, it is. The issues that caused me do that were fixed long ago. >=20 >> 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, Windo= ws >> conio has deprecated getch() and has defined _getch() in its place. So I >> changed it to _getch(), to access the conio version. >=20 > 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. >=20 >> There is a tiny issue now that with this conio _getch(), gdb does not pr= operly >> process backspace characters. >=20 > 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 =E2=80=9Cgetch()=E2=80=9D in = rl_getc() in input.c >> and see why it returns EOF no matter what (when linking with ncurses). >=20 > 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 =E2= =80=9CGDB simply should not use that function in the MinGW build,=E2=80=9D = and the statement above, =E2=80=9CI don't think there's a need for any patc= hes.=E2=80=9D How should one not use that function without affecting the so= urce? Has this patch (changing getch to _getch) already been applied somewh= ere other than 7.11 (where I happen to be focused)? > Thanks. Thank you.