Mingw-packages: gdb: readline support broken

Created on 15 May 2019  路  10Comments  路  Source: msys2/MINGW-packages

Hi there,

with mingw-w64-i686-gdb 8.2.1-2 it is impossible to recall previous commands or even navigate the cursor within the current command using the arrow keys. This happens, although gdb is apparently linked against libreadline8.dll.

  • Fabian

Most helpful comment

In general, mintty does not work correctly with non-MSYS2 applications for anything beyond basic input/output. If you like mintty, you can try winpty, which in theory should solve those limitations:

$ pacman -S winpty
$ winpty gdb ...

All 10 comments

This can be found in the build logs, not sure if it is related:

checking for isl 0.15 or later... yes
*** This configuration is not supported in the following subdirectories:
     readline
    (Any other directories should still work fine.)
checking for default BUILD_CONFIG... 

Does it work if you use gdb from the CMD.EXE shell window instead of MSYS2 mintty?

@fabiangreffrath the current version of mingw-w64-i686-gdb obtainable through pacman is 8.3-1.
The current msys variant is 8.2.1-1 though.
@oscarfv not sure about the _i686_ variant, but mingw-w64-x86_64-gdb 8.3-1 is having symbol resolution problems with libboost_regex-mt.dll.
image
_(cannot find function in DLL)
This only shows up if started from command prompt, not from mintty.
When run through mintty (gdb --help), it shows nothing but the error code is 127._

@oscarfv Indeed it seems to work as intended if started from CMD.

In general, mintty does not work correctly with non-MSYS2 applications for anything beyond basic input/output. If you like mintty, you can try winpty, which in theory should solve those limitations:

$ pacman -S winpty
$ winpty gdb ...

@fabiangreffrath : if you consider that this issue is resolved, please close it. Thanks.

@fabiangreffrath : if you consider that this issue is resolved, please close it. Thanks.

I don't. I still want readline support to work correctly if gdb is started from mintty.

@fabiangreffrath : good luck with that:

https://github.com/mintty/mintty/wiki/Tips (search for "alien")

What MSYS2 could do is to not use mintty, at least by default. I guess most users will use the console for interactive MinGW programs than for interactive MSYS2 programs.

Hi @oscarfv
I just updated my entire MSYS2 installation and MinGW GDB line editing (arrow keys, backspace) is also broken in CMD.EXE (Windows 10 1903) for me. Tried both mingw-w64-x64-gdb 8.2.1-2 and mingw-w64-x64-gdb 8.3-7, same results. Any suggestion?
Edit: sorry, using 64-bit packages

@MCP1 : no further suggestions from me, sorry. I seldom use gdb on Windows.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fspeech picture fspeech  路  6Comments

WilliamKappler picture WilliamKappler  路  4Comments

gbschenkel picture gbschenkel  路  5Comments

MenaceInc picture MenaceInc  路  6Comments

Ede123 picture Ede123  路  7Comments