From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9642 invoked by alias); 26 Dec 2014 08:04:27 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 9628 invoked by uid 89); 26 Dec 2014 08:04:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout20.012.net.il Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 Dec 2014 08:04:23 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NH600300JORCY00@a-mtaout20.012.net.il> for gdb@sourceware.org; Fri, 26 Dec 2014 10:04:20 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NH6002CKJR7Y5A0@a-mtaout20.012.net.il>; Fri, 26 Dec 2014 10:04:19 +0200 (IST) Date: Fri, 26 Dec 2014 08:04:00 -0000 From: Eli Zaretskii Subject: Re: building gdb with TUI support on Windows In-reply-to: To: Ofir Cohen Cc: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83d276n8fy.fsf@gnu.org> References: X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00039.txt.bz2 > Date: Fri, 26 Dec 2014 02:13:36 +0200 > From: Ofir Cohen > > I'm trying to build gdb from source with TUI support on Windows. > I'm using msys2 with MinGWx64. > It seems non-trivial, and is accompanied by undesired behavior. > > I'm addressing this mailing list after a long period of trying by myself > and because I couldn't find a decent place where this could be solved. > > I manage to build by commenting out tputs() implementation in > gdb/windows-termcap.c > (so the ncurses tputs is used instead). Are you sure this is the only place where you need changes in order to use ncurses? There used to be quite a few places where GDB and readline worked around the missing curses library on Windows, and those places were never modified to account for ncurses being available on Windows. When I build GDB, even without TUI, I need to hide libncurses from the configure script in order to build a working debugger. > However, when I run: "gdb --tui" from msys2 I get a "TUI mode not > supported". I would suggest to debug this: find out where this message is coming from, and use GDB (without TUI ;-) to investigate the reasons. > When I run it from DOS (with mingw64 paths in the PATH), it runs but > I cannot move the text cursor to left arrow and right arrow), and > even more annoying, I can't use the CTRL+R (history lookup). > > I saw some post about gdb with TUI support on Windows: > http://migeel.sk/blog/2009/04/15/compiling-gdb-under-windows/ > > But it didn't help. > > Do you have any idea how to get it done right? Eventually, the only way to solve this is to debug the binary you build. Find the code that handles the arrow keys and Ctrl-R, and step through it to understand what's wrong. It is also worth looking into the second change mentioned by the above article (although it's very old, and might be no longer applicable): it seems to hint that GDB uses a pipe to communicate with readline, which might be one reason for problems, since pipes are notoriously unportable between Posix and Windows platforms. Or maybe someone else did build GDB with TUI on Windows, and they will respond shortly. Good luck.