public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ofir Cohen <ofircohenn@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: building gdb with TUI support on Windows
Date: Fri, 26 Dec 2014 08:04:00 -0000	[thread overview]
Message-ID: <83d276n8fy.fsf@gnu.org> (raw)
In-Reply-To: <CAHOBVAer1jbry4Ksxwj0D5dYC_d7c60vqoeh69Fry8L+zErSzA@mail.gmail.com>

> Date: Fri, 26 Dec 2014 02:13:36 +0200
> From: Ofir Cohen <ofircohenn@gmail.com>
> 
> 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.

  reply	other threads:[~2014-12-26  8:04 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-26  0:13 Ofir Cohen
2014-12-26  8:04 ` Eli Zaretskii [this message]
2014-12-27 13:53   ` Ofir Cohen
     [not found]   ` <CAHOBVAdux2M9aRnkJh1hDm_9VCTD6kVzWkF2fjj84qy8UJuh7w@mail.gmail.com>
2014-12-27 14:13     ` Eli Zaretskii
2014-12-27 14:40       ` Hannes Domani
2014-12-27 18:32         ` Eli Zaretskii
2014-12-28 13:58           ` Hannes Domani
2014-12-28 16:41             ` Ofir Cohen
2014-12-28 17:09               ` Hannes Domani
2014-12-28 23:34                 ` Ofir Cohen
2014-12-29  0:41                   ` Hannes Domani
2014-12-29 15:28                     ` Ofir Cohen
     [not found]                       ` <946370725.2390231.1419869855237.JavaMail.yahoo@jws11110.mail.ir2.yahoo.com>
2014-12-29 16:20                         ` Hannes Domani
2014-12-30 19:15                       ` Hannes Domani
2014-12-30 20:10                         ` Ofir Cohen
2014-12-30 20:39                           ` Hannes Domani
2014-12-31 16:34                             ` Eli Zaretskii
2015-01-01 12:28                               ` Hannes Domani
2015-01-01 15:42                                 ` Eli Zaretskii
2014-12-31 21:12                             ` Ofir Cohen
2015-01-01 14:26                               ` Hannes Domani
2015-01-01 15:14                                 ` Ofir Cohen
2015-01-01 15:47                                 ` Eli Zaretskii
2015-01-01 16:33                                   ` Ofir Cohen
2015-01-01 16:42                                     ` Eli Zaretskii
2015-01-01 16:48                                       ` Joel Sherrill
2015-01-01 17:18                                         ` Eli Zaretskii
     [not found]                                           ` <CAHOBVAcF824319G6O_LfJBYAQP3M0-LbhAV_d=SrR6jM4=0k5w@mail.gmail.com>
     [not found]                                             ` <83d26ybcap.fsf@gnu.org>
2015-01-02  0:32                                               ` Ofir Cohen
2014-12-28 18:38         ` Sergio Durigan Junior
2014-12-29  2:43           ` Joel Brobecker
2014-12-29  3:15             ` Joel Sherrill
2014-12-29  3:21               ` Joel Brobecker

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=83d276n8fy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=ofircohenn@gmail.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).