building gdb with TUI support on Windows

Ofir Cohen
2014-12-26T00:13:42Z

Hi guys,
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).

However,
when I run: "gdb --tui"
from msys2 I get a "TUI mode not supported".

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?

P.S. this is how I build
export FLAGS="--enable-tui=no --with-expat --disable-gdbserver
--with-sysroot=\"remote:\" --build=x86_64-w64-mingw32"
./configure $FLAGS
make -j 8

Your help is very much appreciated =].

Thanks,
Ofir Cohen