This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building gdb with TUI support on Windows


Hi Hannes,
I followed your advice, but I get compilation errors.

1) build pdcurses (with patched tputs)
a. copy term.h/curses.h to /mingw64/include and /mingw64/include/ncurses
b. copy libncurses.a  to /mingw64/lib/
1) cd gdb-7.8
2) mkdir build; cd build
3) .././configure --enable-tui --with-expat --build=x86_64-w64-mingw32
4) make
5) from DOS:
a) set PATH=c:\msys64\mingw64\bin\;%PATH%
b) d:\gdb-7.8\build\gdb\gdb --tui

and even tried more to force use the ncurses termcap with:
.././configure --enable-tui --with-curses --with-expat
--build=x86_64-w64-mingw32

But on TUI mode, the left/right/up arrows still don't work.
Neither does the CTRL+R (history lookup).

Though when you quit TUI mode (CTRL +x, a), the arrows start functioning,
and then when you go back to TUI mode (same keys combination), they don't work.

Do the arrow keys work for you when you're in TUI mode?
What do you think is the problem?

Note: the samples that come with pdcurses work, and the arrow keys
function there.
So it seems to be a gdb per se problem, and not some lack of support
from the library.

Thanks,
Ofir Cohen

On 28 December 2014 at 19:08, Hannes Domani <ssbssa@yahoo.de> wrote:
>> Ofir Cohen <ofircohenn@gmail.com> schrieb am 17:41 Sonntag, 28.Dezember 2014:
>> Hi Hannes,
>> Thanks a lot for the reply.
>>
>> It seems like one has to hack his own way through the code,
>> and concrete steps / further description will be very helpful in my case.
>>
>> > I only had to change tputs() a bit.
>> Could you please describe what changes are required there?
>> I just commented it out, but I'm not sure that's enough.
>
> I just changed it so that it actually does something:
>
> --- a/pdcurses/terminfo.c
> +++ b/pdcurses/terminfo.c
> @@ -211,5 +211,8 @@ int tputs(const char *str, int affcnt, int (*putfunc)(int))
> {
> PDC_LOG(("tputs() - called\n"));
>
> -    return ERR;
> +    while (*str)
> +        putfunc(*str++);
> +
> +    return 0;
> }
>
>
>
>> > Since then I switched to pdcurses, it works much better (+faster) on windows.
>> What environment and configuration did you use for building it?
>> Do you just:
>> ./configure --prefix=/mingw
>> make
>> make install
>>
>> and build gdb (in my case it's msys/msys2)?
>>
>> Or you needed to hack a little bit more (since PDCurses will not be
>> found by default by configure)
>> by adding for example some symbolic links from pdcurses libraries to ncurses?
>
> I used the win32/gccwin32.mak:
> make -f win32/gccwin32.mak pdcurses.a
>
> After renaming pdcurses.a to libcurses.a, I moved curses.h/term.h/libcurses.a where gdb-configure needed it.
>
> I think that's all.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]