From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119983 invoked by alias); 14 Sep 2016 02:42:51 -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 119965 invoked by uid 89); 14 Sep 2016 02:42:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:cable.0, D*crelg.com, giah, gdb@crelg.com X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Sep 2016 02:42:40 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bk09j-00065g-CN for gdb-patches@sourceware.org; Tue, 13 Sep 2016 22:42:38 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk09j-00065a-9g; Tue, 13 Sep 2016 22:42:35 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3356 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bk09i-0008HX-9l; Tue, 13 Sep 2016 22:42:34 -0400 Date: Wed, 14 Sep 2016 02:42:00 -0000 Message-Id: <83d1k78an5.fsf@gnu.org> From: Eli Zaretskii To: Giah de Barag CC: gdb-patches@sourceware.org In-reply-to: <1E55DA7D-4F01-49BB-99FF-5A79933415A4@crelg.com> (message from Giah de Barag on Tue, 13 Sep 2016 17:20:52 -0400) Subject: Re: Enabled TUI mode on MSYS2 Reply-to: Eli Zaretskii References: <1E55DA7D-4F01-49BB-99FF-5A79933415A4@crelg.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00103.txt.bz2 > From: Giah de Barag > 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.